1 IN: io.unix.launcher.parser.tests
2 USING: io.unix.launcher.parser tools.test ;
4 [ "" tokenize-command ] must-fail
5 [ " " tokenize-command ] must-fail
6 [ V{ "a" } ] [ "a" tokenize-command ] unit-test
7 [ V{ "abc" } ] [ "abc" tokenize-command ] unit-test
8 [ V{ "abc" } ] [ "abc " tokenize-command ] unit-test
9 [ V{ "abc" } ] [ " abc" tokenize-command ] unit-test
10 [ V{ "abc" "def" } ] [ "abc def" tokenize-command ] unit-test
11 [ V{ "abc def" } ] [ "abc\\ def" tokenize-command ] unit-test
12 [ V{ "abc\\" "def" } ] [ "abc\\\\ def" tokenize-command ] unit-test
13 [ V{ "abc\\ def" } ] [ "'abc\\\\ def'" tokenize-command ] unit-test
14 [ V{ "abc\\ def" } ] [ " 'abc\\\\ def'" tokenize-command ] unit-test
15 [ V{ "abc\\ def" "hey" } ] [ "'abc\\\\ def' hey" tokenize-command ] unit-test
16 [ V{ "abc def" "hey" } ] [ "'abc def' \"hey\"" tokenize-command ] unit-test
17 [ "'abc def' \"hey" tokenize-command ] must-fail
18 [ "'abc def" tokenize-command ] must-fail
19 [ V{ "abc def" "h\"ey" } ] [ "'abc def' \"h\\\"ey\" " tokenize-command ] unit-test
23 "Hello world.app/Contents/MacOS/hello-ui"
24 "-i=boot.macosx-ppc.image"
25 "-include= math compiler ui"
26 "-deploy-vocab=hello-ui"
27 "-output-image=Hello world.app/Contents/Resources/hello-ui.image"
32 "\"Hello world.app/Contents/MacOS/hello-ui\" -i=boot.macosx-ppc.image \"-include= math compiler ui\" -deploy-vocab=hello-ui \"-output-image=Hello world.app/Contents/Resources/hello-ui.image\" -no-stack-traces -no-user-init" tokenize-command