1 USING: accessors eval strings.parser strings.parser.private
3 IN: strings.parser.tests
5 [ "Hello\n\rworld" ] [ "Hello\\n\\rworld" unescape-string ] unit-test
7 [ "Hello\n\rworld" ] [ "Hello\n\rworld" ] unit-test
8 [ "Hello\n\rworld" ] [ """Hello\n\rworld""" ] unit-test
9 [ "Hello\n\rworld\n" ] [ "Hello\n\rworld
11 [ "Hello\n\rworld" "hi" ] [ "Hello\n\rworld" "hi" ] unit-test
12 [ "Hello\n\rworld" "hi" ] [ """Hello\n\rworld""" """hi""" ] unit-test
13 [ "Hello\n\rworld\n" "hi" ] [ """Hello\n\rworld
14 """ """hi""" ] unit-test
15 [ "Hello\n\rworld\"" "hi" ] [ """Hello\n\rworld\"""" """hi""" ] unit-test
18 "\"\"\"Hello\n\rworld\\\n\"\"\"" eval( -- obj )
20 error>> escaped-char-expected?
26 "\"\"\" \" abc \" \"\"\"" eval( -- string )
32 "\"\"\"\"abc\"\"\"\"" eval( -- string )
36 [ "\"\\" ] [ "\"\\" ] unit-test
38 [ "\e" ] [ "\u00001b" ] unit-test
39 [ "\e" ] [ "\x1b" ] unit-test