Idris2/tests/idris2/basic053/RawString.idr
Andy Lok 4ceccaf00c Support raw string
Add wrap on file end

use rust-style raw string syntax

use swift style syntax raw string

Update src/Parser/Support.idr

Co-authored-by: André Videla <andre.videla@gmail.com>

Escape line wrap

Resolve conflict
2021-02-02 19:37:53 +08:00

35 lines
485 B
Idris

module RawString
withWrap : String
withWrap = "foo
bar"
withNoWrap : String
withNoWrap = "foo \
bar"
withIndent : String
withIndent = "foo
bar"
withEscape : String
withEscape = #""foo"\#n
\bar"#
withEscapeNoWrap : String
withEscapeNoWrap = #""foo" \#
\bar"#
test : IO ()
test =
do
putStrLn withWrap
putStrLn withNoWrap
putStrLn withIndent
putStrLn withEscape
putStrLn withEscapeNoWrap
putStrLn ##"
name: #"foo"
version: "bar"
bzs: \#\'a\n\t\\'"##