2017-08-26 02:25:23 -04:00
|
|
|
! Copyright (C) 2017 Doug Coleman.
|
|
|
|
|
! See http://factorcode.org/license.txt for BSD license.
|
|
|
|
|
USING: modern modern.slices tools.test ;
|
|
|
|
|
IN: modern.tests
|
|
|
|
|
|
2017-08-26 12:21:09 -04:00
|
|
|
! Comment
|
2017-08-26 02:25:23 -04:00
|
|
|
{
|
|
|
|
|
{ { "!" "" } }
|
|
|
|
|
} [ "!" string>literals >strings ] unit-test
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
{ { "!" " lol" } }
|
|
|
|
|
} [ "! lol" string>literals >strings ] unit-test
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
{ "lol!" }
|
|
|
|
|
} [ "lol!" string>literals >strings ] unit-test
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
{ { "!" "lol" } }
|
|
|
|
|
} [ "!lol" string>literals >strings ] unit-test
|
2017-08-26 12:21:09 -04:00
|
|
|
|
|
|
|
|
! Colon
|
|
|
|
|
{
|
|
|
|
|
{ ":asdf:" }
|
|
|
|
|
} [ ":asdf:" string>literals >strings ] unit-test
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
{ { "one:" "1" } }
|
|
|
|
|
} [ "one: 1" string>literals >strings ] unit-test
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
{ "1" ":>" "one" }
|
|
|
|
|
} [ "1 :> one" string>literals >strings ] unit-test
|
|
|
|
|
|
|
|
|
|
! Acute
|
|
|
|
|
{
|
|
|
|
|
{ { "<A" { } "A>" } }
|
|
|
|
|
} [ "<A A>" string>literals >strings ] unit-test
|
2017-08-26 12:57:16 -04:00
|
|
|
|
|
|
|
|
{
|
|
|
|
|
{ { "<B:" { "hi" } ";B>" } }
|
|
|
|
|
} [ "<B: hi ;B>" string>literals >strings ] unit-test
|
|
|
|
|
|
|
|
|
|
{ { "<foo>" } } [ "<foo>" string>literals >strings ] unit-test
|
|
|
|
|
{ { ">foo<" } } [ ">foo<" string>literals >strings ] unit-test
|
|
|
|
|
|
|
|
|
|
{ { "foo>" } } [ "foo>" string>literals >strings ] unit-test
|
|
|
|
|
{ { ">foo" } } [ ">foo" string>literals >strings ] unit-test
|
|
|
|
|
{ { ">foo>" } } [ ">foo>" string>literals >strings ] unit-test
|
|
|
|
|
{ { ">>foo>" } } [ ">>foo>" string>literals >strings ] unit-test
|
|
|
|
|
{ { ">>foo>>" } } [ ">>foo>>" string>literals >strings ] unit-test
|
|
|
|
|
|
|
|
|
|
{ { "foo<" } } [ "foo<" string>literals >strings ] unit-test
|
|
|
|
|
{ { "<foo" } } [ "<foo" string>literals >strings ] unit-test
|
|
|
|
|
{ { "<foo<" } } [ "<foo<" string>literals >strings ] unit-test
|
|
|
|
|
{ { "<<foo<" } } [ "<<foo<" string>literals >strings ] unit-test
|
|
|
|
|
{ { "<<foo<<" } } [ "<<foo<<" string>literals >strings ] unit-test
|
|
|
|
|
|
2017-08-26 14:09:47 -04:00
|
|
|
! Backslash \AVL{ foo\bar foo\bar{
|
2017-08-26 12:57:16 -04:00
|
|
|
{
|
2017-08-26 14:09:47 -04:00
|
|
|
{ { "SYNTAX:" { "\\AVL{" } } }
|
|
|
|
|
} [ "SYNTAX: \\AVL{" string>literals >strings ] unit-test
|
2017-08-26 12:57:16 -04:00
|
|
|
|
2017-08-26 14:52:35 -04:00
|
|
|
[ "\\" string>literals >strings ] must-fail ! \ alone should be legal eventually (?)
|
2017-08-26 14:09:47 -04:00
|
|
|
{ { "\\FOO" } } [ "\\FOO" string>literals >strings ] unit-test
|
2017-08-26 12:57:16 -04:00
|
|
|
|
|
|
|
|
{
|
|
|
|
|
{ "foo\\bar" }
|
|
|
|
|
} [ "foo\\bar" string>literals >strings ] unit-test
|
|
|
|
|
|
|
|
|
|
[ "foo\\bar{" string>literals >strings ] must-fail
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
{ { "foo\\bar{" { "1" } "}" } }
|
|
|
|
|
} [ "foo\\bar{ 1 }" string>literals >strings ] unit-test
|
2017-08-26 14:09:47 -04:00
|
|
|
|
|
|
|
|
{ { { "char:" "\\{" } } } [ "char: \\{" string>literals >strings ] unit-test
|
|
|
|
|
[ "char: {" string>literals >strings ] must-fail
|
|
|
|
|
[ "char: [" string>literals >strings ] must-fail
|
|
|
|
|
[ "char: {" string>literals >strings ] must-fail
|
|
|
|
|
[ "char: \"" string>literals >strings ] must-fail
|
|
|
|
|
{ { { "char:" "\\\\" } } } [ "char: \\\\" string>literals >strings ] unit-test
|
2017-08-26 14:52:35 -04:00
|
|
|
|
|
|
|
|
[ "char: \\" string>literals >strings ] must-fail ! char: \ should be legal eventually
|
|
|
|
|
|
|
|
|
|
! \ backslash going away someday
|
|
|
|
|
|
|
|
|
|
{ { { "\\" "(" } } } [ "\\ (" string>literals >strings ] unit-test
|
|
|
|
|
|
2017-08-26 14:56:49 -04:00
|
|
|
{ { "\\[[" } } [ "\\[[" string>literals >strings ] unit-test
|
|
|
|
|
{ { "\\[=[" } } [ "\\[=[" string>literals >strings ] unit-test
|
|
|
|
|
{ { "\\[==[" } } [ "\\[==[" string>literals >strings ] unit-test
|