mirror of
https://github.com/Smaug123/WoofWare.Expect
synced 2025-10-07 05:28:40 +00:00
70 lines
1.6 KiB
Forth
70 lines
1.6 KiB
Forth
namespace BigExample
|
|
|
|
open WoofWare.Expect
|
|
|
|
module MyModule =
|
|
let emptyString () =
|
|
expect {
|
|
snapshot ""
|
|
return ""
|
|
}
|
|
|
|
let emptyVerbatim () =
|
|
expect {
|
|
snapshot @""
|
|
return ""
|
|
}
|
|
|
|
let emptyTripleQuote () =
|
|
expect {
|
|
snapshot """"""
|
|
return ""
|
|
}
|
|
|
|
let onlyWhitespace () =
|
|
expect {
|
|
snapshot " \t\n "
|
|
return "whitespace"
|
|
}
|
|
|
|
let quotesInQuotes () =
|
|
expect {
|
|
snapshot @"He said ""Hello"" and she said ""Hi"""
|
|
return "quotes"
|
|
}
|
|
|
|
let backslashesGalore () =
|
|
expect {
|
|
snapshot @"C:\Users\Test\Documents\file.txt"
|
|
return "path"
|
|
}
|
|
|
|
let veryLongLine () =
|
|
expect {
|
|
snapshot
|
|
@"This is a very long line that goes on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and contains over 300 characters to test how the parser handles very long single-line strings"
|
|
|
|
return "long line"
|
|
}
|
|
|
|
let leadingNewlines () =
|
|
expect {
|
|
snapshot
|
|
"""
|
|
|
|
Starts with newlines"""
|
|
|
|
return "leading"
|
|
}
|
|
|
|
let trailingNewlines () =
|
|
expect {
|
|
snapshot
|
|
"""Ends with newlines
|
|
|
|
|
|
"""
|
|
|
|
return "trailing"
|
|
}
|