From e3e59d041930d74812c04ac9fb600f1efb952fbe Mon Sep 17 00:00:00 2001 From: "Hunter L. Allen" Date: Wed, 12 Sep 2018 23:15:37 -0400 Subject: [PATCH] Re-structure Test older structure (#31) Re-structure Test Directory Structure --- .travis.yml | 3 ++- test/{ => script-tests}/README | 0 test/{ => script-tests}/ament_code_style.cfg | 0 test/{ => script-tests}/bgfile | 0 test/{ => script-tests}/err.mine | 0 test/{ => script-tests}/file-list | 0 test/{ => script-tests}/file1.cc | 0 test/{ => script-tests}/files/aaa | 0 test/{ => script-tests}/issue-21-test | 4 ++-- test/{ => script-tests}/issue-33-test | 6 +++--- test/{ => script-tests}/issue-48-test | 2 +- test/{ => script-tests}/issue-53-test | 2 +- test/{ => script-tests}/issue-58-test | 2 +- test/{ => script-tests}/run-linter.bash | 0 test/{ => script-tests}/shellin | 0 test/{ => script-tests}/test1 | 2 +- test/{ => script-tests}/test10 | 2 +- test/{ => script-tests}/test102 | 2 +- test/{ => script-tests}/test103 | 2 +- test/{ => script-tests}/test104 | 2 +- test/{ => script-tests}/test105 | 2 +- test/{ => script-tests}/test106 | 2 +- test/{ => script-tests}/test107 | 2 +- test/{ => script-tests}/test108 | 2 +- test/{ => script-tests}/test109 | 2 +- test/{ => script-tests}/test11 | 2 +- test/{ => script-tests}/test110 | 2 +- test/{ => script-tests}/test111 | 2 +- test/{ => script-tests}/test112 | 2 +- test/{ => script-tests}/test112-2 | 2 +- test/{ => script-tests}/test113 | 2 +- test/{ => script-tests}/test114 | 2 +- test/{ => script-tests}/test115 | 2 +- test/{ => script-tests}/test116 | 2 +- test/{ => script-tests}/test13 | 2 +- test/{ => script-tests}/test14 | 2 +- test/{ => script-tests}/test15 | 2 +- test/{ => script-tests}/test16 | 2 +- test/{ => script-tests}/test17 | 2 +- test/{ => script-tests}/test18 | 2 +- test/{ => script-tests}/test2 | 2 +- test/{ => script-tests}/test201 | 2 +- test/{ => script-tests}/test202 | 2 +- test/{ => script-tests}/test203 | 2 +- test/{ => script-tests}/test204 | 2 +- test/{ => script-tests}/test3 | 2 +- test/{ => script-tests}/test3-2 | 2 +- test/{ => script-tests}/test3-3 | 4 ++-- test/{ => script-tests}/test4 | 2 +- test/{ => script-tests}/test5 | 2 +- test/{ => script-tests}/test6 | 2 +- test/{ => script-tests}/test7 | 2 +- test/{ => script-tests}/test8 | 2 +- test/{ => script-tests}/test9 | 2 +- test/{ => script-tests}/testall | 0 55 files changed, 50 insertions(+), 49 deletions(-) rename test/{ => script-tests}/README (100%) rename test/{ => script-tests}/ament_code_style.cfg (100%) rename test/{ => script-tests}/bgfile (100%) rename test/{ => script-tests}/err.mine (100%) rename test/{ => script-tests}/file-list (100%) rename test/{ => script-tests}/file1.cc (100%) rename test/{ => script-tests}/files/aaa (100%) rename test/{ => script-tests}/issue-21-test (95%) rename test/{ => script-tests}/issue-33-test (81%) rename test/{ => script-tests}/issue-48-test (91%) rename test/{ => script-tests}/issue-53-test (91%) rename test/{ => script-tests}/issue-58-test (92%) rename test/{ => script-tests}/run-linter.bash (100%) rename test/{ => script-tests}/shellin (100%) rename test/{ => script-tests}/test1 (87%) rename test/{ => script-tests}/test10 (92%) rename test/{ => script-tests}/test102 (86%) rename test/{ => script-tests}/test103 (87%) rename test/{ => script-tests}/test104 (86%) rename test/{ => script-tests}/test105 (86%) rename test/{ => script-tests}/test106 (86%) rename test/{ => script-tests}/test107 (87%) rename test/{ => script-tests}/test108 (92%) rename test/{ => script-tests}/test109 (87%) rename test/{ => script-tests}/test11 (87%) rename test/{ => script-tests}/test110 (87%) rename test/{ => script-tests}/test111 (92%) rename test/{ => script-tests}/test112 (93%) rename test/{ => script-tests}/test112-2 (86%) rename test/{ => script-tests}/test113 (88%) rename test/{ => script-tests}/test114 (90%) rename test/{ => script-tests}/test115 (85%) rename test/{ => script-tests}/test116 (85%) rename test/{ => script-tests}/test13 (89%) rename test/{ => script-tests}/test14 (90%) rename test/{ => script-tests}/test15 (91%) rename test/{ => script-tests}/test16 (89%) rename test/{ => script-tests}/test17 (88%) rename test/{ => script-tests}/test18 (88%) rename test/{ => script-tests}/test2 (87%) rename test/{ => script-tests}/test201 (92%) rename test/{ => script-tests}/test202 (97%) rename test/{ => script-tests}/test203 (91%) rename test/{ => script-tests}/test204 (93%) rename test/{ => script-tests}/test3 (91%) rename test/{ => script-tests}/test3-2 (92%) rename test/{ => script-tests}/test3-3 (85%) rename test/{ => script-tests}/test4 (85%) rename test/{ => script-tests}/test5 (86%) rename test/{ => script-tests}/test6 (87%) rename test/{ => script-tests}/test7 (89%) rename test/{ => script-tests}/test8 (88%) rename test/{ => script-tests}/test9 (84%) rename test/{ => script-tests}/testall (100%) diff --git a/.travis.yml b/.travis.yml index 4c1ff8c..1630461 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,8 @@ script: - make -j$(nproc) - ln -sf $(pwd)/yash $(pwd)/../shell - ln -sf $(pwd)/yash $(pwd)/../src/yash - - cd ../test + - export SHELL_BIN=$(pwd)/yash + - cd ../test/script-tests - export LC_COLLATE="C" - export IS_TRAVIS="YES" - ./testall diff --git a/test/README b/test/script-tests/README similarity index 100% rename from test/README rename to test/script-tests/README diff --git a/test/ament_code_style.cfg b/test/script-tests/ament_code_style.cfg similarity index 100% rename from test/ament_code_style.cfg rename to test/script-tests/ament_code_style.cfg diff --git a/test/bgfile b/test/script-tests/bgfile similarity index 100% rename from test/bgfile rename to test/script-tests/bgfile diff --git a/test/err.mine b/test/script-tests/err.mine similarity index 100% rename from test/err.mine rename to test/script-tests/err.mine diff --git a/test/file-list b/test/script-tests/file-list similarity index 100% rename from test/file-list rename to test/script-tests/file-list diff --git a/test/file1.cc b/test/script-tests/file1.cc similarity index 100% rename from test/file1.cc rename to test/script-tests/file1.cc diff --git a/test/files/aaa b/test/script-tests/files/aaa similarity index 100% rename from test/files/aaa rename to test/script-tests/files/aaa diff --git a/test/issue-21-test b/test/script-tests/issue-21-test similarity index 95% rename from test/issue-21-test rename to test/script-tests/issue-21-test index 9a9581e..e75fcf8 100755 --- a/test/issue-21-test +++ b/test/script-tests/issue-21-test @@ -12,8 +12,8 @@ echo "pwd" >> simple_cd echo ${cd_cmd} > shane_cd echo "pwd" >> shane_cd -../src/yash < simple_cd &>> simple_out -../src/yash < shane_cd &>> shane_out +${SHELL_BIN} < simple_cd &>> simple_out +${SHELL_BIN} < shane_cd &>> shane_out diff simple_out shane_out diff --git a/test/issue-33-test b/test/script-tests/issue-33-test similarity index 81% rename from test/issue-33-test rename to test/script-tests/issue-33-test index 25b882a..779c16f 100755 --- a/test/issue-33-test +++ b/test/script-tests/issue-33-test @@ -9,11 +9,11 @@ mkdir -p a echo "cd a" > yash-in echo "cd a" > bash-in -echo "echo ../../test/*" >> yash-in -echo "echo ../../test/*" >> bash-in +echo "echo ../../script-tests/*" >> yash-in +echo "echo ../../script-tests/*" >> bash-in /bin/bash < bash-in > bash-out 2>&1 -../src/yash < yash-in > yash-out 2>&1 +${SHELL_BIN} < yash-in > yash-out 2>&1 rm -rf a diff --git a/test/issue-48-test b/test/script-tests/issue-48-test similarity index 91% rename from test/issue-48-test rename to test/script-tests/issue-48-test index 8a7dc6c..8cf3e72 100755 --- a/test/issue-48-test +++ b/test/script-tests/issue-48-test @@ -9,7 +9,7 @@ echo "pwd" >> yash-in correct="$(pwd)/a/second" echo "$correct" > yash-out.org -../src/yash < yash-in > yash-out 2>&1 +${SHELL_BIN} < yash-in > yash-out 2>&1 rm -rf a diff --git a/test/issue-53-test b/test/script-tests/issue-53-test similarity index 91% rename from test/issue-53-test rename to test/script-tests/issue-53-test index 1ecfbbf..9d1ed90 100755 --- a/test/issue-53-test +++ b/test/script-tests/issue-53-test @@ -11,7 +11,7 @@ echo "echo \"*\"" >> yash-in echo "echo \"*\"" >> bash-in /bin/bash < bash-in > bash-out 2>&1 -../src/yash < yash-in > yash-out 2>&1 +${SHELL_BIN} < yash-in > yash-out 2>&1 rm -rf a diff --git a/test/issue-58-test b/test/script-tests/issue-58-test similarity index 92% rename from test/issue-58-test rename to test/script-tests/issue-58-test index 065f1d0..5addc2f 100755 --- a/test/issue-58-test +++ b/test/script-tests/issue-58-test @@ -12,7 +12,7 @@ echo "cat ~/test.txt" >> bash-in echo "rm -f ~/test.txt" >> bash-in /bin/bash < bash-in > bash-out 2>&1 -../src/yash < yash-in > yash-out 2>&1 +${SHELL_BIN} < yash-in > yash-out 2>&1 diff yash-out bash-out if [ $? -ne 0 ] diff --git a/test/run-linter.bash b/test/script-tests/run-linter.bash similarity index 100% rename from test/run-linter.bash rename to test/script-tests/run-linter.bash diff --git a/test/shellin b/test/script-tests/shellin similarity index 100% rename from test/shellin rename to test/script-tests/shellin diff --git a/test/test1 b/test/script-tests/test1 similarity index 87% rename from test/test1 rename to test/script-tests/test1 index 2e458d6..bba1f94 100755 --- a/test/test1 +++ b/test/script-tests/test1 @@ -4,7 +4,7 @@ rm -f out1 out2 echo "ls files > out1" > yash-in echo "ls files > out2" > csh-in /bin/sh < csh-in > csh-out -../src/yash < yash-in > yash-out +${SHELL_BIN} < yash-in > yash-out diff out1 out2 if [ $? -ne 0 ] diff --git a/test/test10 b/test/script-tests/test10 similarity index 92% rename from test/test10 rename to test/script-tests/test10 index dac4685..5dd1d7c 100755 --- a/test/test10 +++ b/test/script-tests/test10 @@ -14,7 +14,7 @@ echo "ls &" >> shell-in echo "ls &" >> shell-in echo "sleep 5" >> shell-in -../src/yash < shell-in > shell-out & +${SHELL_BIN} < shell-in > shell-out & sleep 5 diff --git a/test/test102 b/test/script-tests/test102 similarity index 86% rename from test/test102 rename to test/script-tests/test102 index b63b350..bb9c8f7 100755 --- a/test/test102 +++ b/test/script-tests/test102 @@ -6,7 +6,7 @@ echo "cd /etc" > shell-in echo "pwd" >> shell-in /bin/sh < shell-in > csh-out 2>&1 -../src/yash < shell-in > shell-out 2>&1 +${SHELL_BIN} < shell-in > shell-out 2>&1 diff shell-out csh-out if [ $? -ne 0 ] diff --git a/test/test103 b/test/script-tests/test103 similarity index 87% rename from test/test103 rename to test/script-tests/test103 index 3876fcb..2f71712 100755 --- a/test/test103 +++ b/test/script-tests/test103 @@ -8,7 +8,7 @@ echo "cd" > csh-in echo "/bin/pwd" >> csh-in /bin/sh < csh-in > csh-out 2>&1 -../src/yash < shell-in > shell-out 2>&1 +${SHELL_BIN} < shell-in > shell-out 2>&1 diff shell-out csh-out if [ $? -ne 0 ] diff --git a/test/test104 b/test/script-tests/test104 similarity index 86% rename from test/test104 rename to test/script-tests/test104 index edabd36..ae4a0d4 100755 --- a/test/test104 +++ b/test/script-tests/test104 @@ -6,7 +6,7 @@ echo "cd ${HOME}" > shell-in echo "/bin/pwd" >> shell-in /bin/sh < shell-in > csh-out 2>&1 -../src/yash < shell-in > shell-out 2>&1 +${SHELL_BIN} < shell-in > shell-out 2>&1 diff shell-out csh-out if [ $? -ne 0 ] diff --git a/test/test105 b/test/script-tests/test105 similarity index 86% rename from test/test105 rename to test/script-tests/test105 index ba57e80..4f09ca1 100755 --- a/test/test105 +++ b/test/script-tests/test105 @@ -5,7 +5,7 @@ echo "Test105: cd notfound >& err1" echo "cd notfound >& err1" > shell-in echo "pwd" >> csh-in -../src/yash < shell-in > shell-out 2>&1 +${SHELL_BIN} < shell-in > shell-out 2>&1 grep "No such file or directory" err1 if [ $? -ne 0 ] diff --git a/test/test106 b/test/script-tests/test106 similarity index 86% rename from test/test106 rename to test/script-tests/test106 index 28a0e9b..b4be04e 100755 --- a/test/test106 +++ b/test/script-tests/test106 @@ -6,7 +6,7 @@ echo "cd /etc" > shell-in echo "pwd" >> shell-in /bin/sh < shell-in > csh-out 2>&1 -../src/yash < shell-in > shell-out 2>&1 +${SHELL_BIN} < shell-in > shell-out 2>&1 diff csh-out shell-out if [ $? -ne 0 ] diff --git a/test/test107 b/test/script-tests/test107 similarity index 87% rename from test/test107 rename to test/script-tests/test107 index 734c218..fd843f7 100755 --- a/test/test107 +++ b/test/script-tests/test107 @@ -7,7 +7,7 @@ echo "echo *" > shell-in echo "echo *" > csh-in /bin/sh < csh-in > csh-out 2>&1 -../src/yash < shell-in > shell-out 2>&1 +${SHELL_BIN} < shell-in > shell-out 2>&1 diff shell-out csh-out if [ $? -ne 0 ] diff --git a/test/test108 b/test/script-tests/test108 similarity index 92% rename from test/test108 rename to test/script-tests/test108 index e4b20b4..7c090ad 100755 --- a/test/test108 +++ b/test/script-tests/test108 @@ -6,7 +6,7 @@ echo "echo /usr/lib/*" > yash-in echo "echo /usr/lib/*" > bash-in /bin/bash < bash-in > bash-out 2>&1 -../src/yash < yash-in > yash-out 2>&1 +${SHELL_BIN} < yash-in > yash-out 2>&1 _diff=$(diff yash-out bash-out) if [[ $? -ne 0 ]]; then diff --git a/test/test109 b/test/script-tests/test109 similarity index 87% rename from test/test109 rename to test/script-tests/test109 index 0a55b60..64fc027 100755 --- a/test/test109 +++ b/test/script-tests/test109 @@ -6,7 +6,7 @@ echo "echo /usr/lib/libt*" > shell-in echo "echo /usr/lib/libt*" > csh-in /bin/sh < csh-in > csh-out 2>&1 -../src/yash < shell-in > shell-out 2>&1 +${SHELL_BIN} < shell-in > shell-out 2>&1 diff shell-out csh-out if [ $? -ne 0 ] diff --git a/test/test11 b/test/script-tests/test11 similarity index 87% rename from test/test11 rename to test/script-tests/test11 index f4a2f7a..2c06b74 100755 --- a/test/test11 +++ b/test/script-tests/test11 @@ -5,7 +5,7 @@ echo "Test11: Enviroment: Set variable" echo "setenv aaa bbbb" > shell-in echo "printenv" >> shell-in -../src/yash < shell-in > shell-out +${SHELL_BIN} < shell-in > shell-out grep aaa=bbbb shell-out > out 2>&1 if [ $? -ne 0 ] diff --git a/test/test110 b/test/script-tests/test110 similarity index 87% rename from test/test110 rename to test/script-tests/test110 index f462539..627986a 100755 --- a/test/test110 +++ b/test/script-tests/test110 @@ -6,7 +6,7 @@ echo "echo /usr/lib/*ck*" > shell-in echo "echo /usr/lib/*ck*" > csh-in /bin/sh < csh-in > csh-out 2>&1 -../src/yash < shell-in > shell-out 2>&1 +${SHELL_BIN} < shell-in > shell-out 2>&1 diff shell-out csh-out if [ $? -ne 0 ] diff --git a/test/test111 b/test/script-tests/test111 similarity index 92% rename from test/test111 rename to test/script-tests/test111 index b4fb6da..ec68e4b 100755 --- a/test/test111 +++ b/test/script-tests/test111 @@ -6,7 +6,7 @@ echo "echo *" >> shell-in echo "echo .*" >> shell-in /bin/bash < shell-in > bash-out 2>&1 -../src/yash < shell-in > yash-out 2>&1 +${SHELL_BIN} < shell-in > yash-out 2>&1 yash_out=$(cat yash-out | sort --field-separator=' ') bash_out=$(cat bash-out | sort --field-separator=' ') diff --git a/test/test112 b/test/script-tests/test112 similarity index 93% rename from test/test112 rename to test/script-tests/test112 index bbca3b1..119d0f6 100755 --- a/test/test112 +++ b/test/script-tests/test112 @@ -5,7 +5,7 @@ echo "Test112: echo /etc/r*/*s* " echo "echo /etc/r*/*s*" > yash-in /bin/bash < yash-in > bash-out 2>&1 -../src/yash < yash-in > yash-out 2>&1 +${SHELL_BIN} < yash-in > yash-out 2>&1 yash_out=$(sort yash-out) bash_out=$(sort bash-out) diff --git a/test/test112-2 b/test/script-tests/test112-2 similarity index 86% rename from test/test112-2 rename to test/script-tests/test112-2 index e2084e3..bca5a5f 100755 --- a/test/test112-2 +++ b/test/script-tests/test112-2 @@ -5,7 +5,7 @@ echo "Test112-2: echo /usr/lib/lib?.a" echo "echo /usr/lib/lib?.a" > shell-in /bin/sh < shell-in > csh-out 2>&1 -../shell < shell-in > shell-out 2>&1 +${SHELL_BIN} < shell-in > shell-out 2>&1 diff shell-out csh-out if [ $? -ne 0 ] diff --git a/test/test113 b/test/script-tests/test113 similarity index 88% rename from test/test113 rename to test/script-tests/test113 index 1b94d8c..4cc37a8 100755 --- a/test/test113 +++ b/test/script-tests/test113 @@ -9,7 +9,7 @@ echo "cd" > csh-in echo "echo lll \">\"" >> csh-in /bin/sh < csh-in > csh-out 2>&1 -../shell < shell-in > shell-out 2>&1 +${SHELL_BIN} < shell-in > shell-out 2>&1 diff shell-out csh-out if [ $? -ne 0 ] diff --git a/test/test114 b/test/script-tests/test114 similarity index 90% rename from test/test114 rename to test/script-tests/test114 index e59fd67..a20e715 100755 --- a/test/test114 +++ b/test/script-tests/test114 @@ -9,7 +9,7 @@ echo "ls file1.cc files" > csh-in echo "ls \"file1.cc files\"" >> csh-in /bin/sh < csh-in > csh-out 2>&1 -../shell < shell-in > shell-out 2>&1 +${SHELL_BIN} < shell-in > shell-out 2>&1 diff shell-out csh-out if [ $? -ne 0 ] diff --git a/test/test115 b/test/script-tests/test115 similarity index 85% rename from test/test115 rename to test/script-tests/test115 index 0676a89..61ef148 100755 --- a/test/test115 +++ b/test/script-tests/test115 @@ -6,7 +6,7 @@ echo "Test115: touch \"hello world\"" echo "touch \"hello world\"" > shell-in echo "ls" >> shell-in -../shell < shell-in > shell-out 2>&1 +${SHELL_BIN} < shell-in > shell-out 2>&1 if [ ! -f "hello world" ] then diff --git a/test/test116 b/test/script-tests/test116 similarity index 85% rename from test/test116 rename to test/script-tests/test116 index 3832cf2..6202751 100755 --- a/test/test116 +++ b/test/script-tests/test116 @@ -4,7 +4,7 @@ rm -f csh-out shell-out echo "Test116: Escape Chars" echo "echo lll\< kkkk\\\\\\ uuuu\&" > shell-in -../shell < shell-in > shell-out 2>&1 +${SHELL_BIN} < shell-in > shell-out 2>&1 grep "lll< kkkk[\] uuuu&" shell-out if [ $? -ne 0 ] diff --git a/test/test13 b/test/script-tests/test13 similarity index 89% rename from test/test13 rename to test/script-tests/test13 index 1bd7445..af5470e 100755 --- a/test/test13 +++ b/test/script-tests/test13 @@ -6,7 +6,7 @@ echo "setenv aaa bbbb" > shell-in echo "setenv aaa pppp" >> shell-in echo "printenv" >> shell-in -../shell < shell-in > shell-out +${SHELL_BIN} < shell-in > shell-out grep aaa=pppp shell-out > out 2>&1 if [ $? -ne 0 ] diff --git a/test/test14 b/test/script-tests/test14 similarity index 90% rename from test/test14 rename to test/script-tests/test14 index ec45caf..3c1f4c5 100755 --- a/test/test14 +++ b/test/script-tests/test14 @@ -7,7 +7,7 @@ echo "printenv" >> shell-in echo "unsetenv aaa" >> shell-in echo "printenv" >> shell-in -../shell < shell-in > shell-out +${SHELL_BIN} < shell-in > shell-out res=`grep -c aaa= shell-out` if [ $res -ne 1 ] diff --git a/test/test15 b/test/script-tests/test15 similarity index 91% rename from test/test15 rename to test/script-tests/test15 index b50638c..d97dca4 100755 --- a/test/test15 +++ b/test/script-tests/test15 @@ -10,7 +10,7 @@ echo "B=world" >> csh-in echo "echo \${A} \${B}" >> csh-in /bin/sh < csh-in > csh-out 2>&1 -../shell < shell-in > shell-out +${SHELL_BIN} < shell-in > shell-out diff shell-out csh-out if [ $? -ne 0 ] diff --git a/test/test16 b/test/script-tests/test16 similarity index 89% rename from test/test16 rename to test/script-tests/test16 index ccfe266..4921200 100755 --- a/test/test16 +++ b/test/script-tests/test16 @@ -6,7 +6,7 @@ echo "setenv C ap" > shell-in echo "setenv D le" >> shell-in echo "echo I like \${C}p\${D}" >> shell-in -../shell < shell-in > shell-out +${SHELL_BIN} < shell-in > shell-out grep "I like apple" shell-out if [ $? -ne 0 ] diff --git a/test/test17 b/test/script-tests/test17 similarity index 88% rename from test/test17 rename to test/script-tests/test17 index 99c89aa..27b0fe7 100755 --- a/test/test17 +++ b/test/script-tests/test17 @@ -4,7 +4,7 @@ echo "Test17: Parsing: words and special characters" echo "ls file1.cc>out1" > shell-in echo "ls file1.cc>out2" > csh-in /bin/sh < csh-in > csh-out -../shell < shell-in > shell-out +${SHELL_BIN} < shell-in > shell-out diff out1 out2 if [ $? -ne 0 ] diff --git a/test/test18 b/test/script-tests/test18 similarity index 88% rename from test/test18 rename to test/script-tests/test18 index 299a601..cf8e35d 100755 --- a/test/test18 +++ b/test/script-tests/test18 @@ -4,7 +4,7 @@ echo "Test18: Parsing: words and special characters" echo "ls|grep fil" > shell-in echo "ls|grep fil" > csh-in /bin/sh < csh-in > csh-out -../shell < shell-in > shell-out +${SHELL_BIN} < shell-in > shell-out diff shell-out csh-out if [ $? -ne 0 ] diff --git a/test/test2 b/test/script-tests/test2 similarity index 87% rename from test/test2 rename to test/script-tests/test2 index da78d86..85ec8d1 100755 --- a/test/test2 +++ b/test/script-tests/test2 @@ -3,7 +3,7 @@ echo "Test2: Test stdin redirection" echo "cat < files/aaa" > shell-in echo "cat < files/aaa" > csh-in /bin/sh < csh-in > csh-out -../shell < shell-in > shell-out +${SHELL_BIN} < shell-in > shell-out diff csh-out shell-out if [ $? -ne 0 ] diff --git a/test/test201 b/test/script-tests/test201 similarity index 92% rename from test/test201 rename to test/script-tests/test201 index e365eed..989d2cf 100755 --- a/test/test201 +++ b/test/script-tests/test201 @@ -2,7 +2,7 @@ echo "Test201: test ctrl-c" echo "sleep 10" > shell-in -../shell < shell-in > shell-out & +${SHELL_BIN} < shell-in > shell-out & # Send ctrl-c to process sleep 1 diff --git a/test/test202 b/test/script-tests/test202 similarity index 97% rename from test/test202 rename to test/script-tests/test202 index 349bae0..0734f54 100755 --- a/test/test202 +++ b/test/script-tests/test202 @@ -32,7 +32,7 @@ echo "ls " >> shell-in echo "ls " >> shell-in /bin/sh < shell-in > csh-out 2>&1 -../shell < shell-in > shell-out 2>&1 +${SHELL_BIN} < shell-in > shell-out 2>&1 diff csh-out shell-out > temp-out 2>&1 if [ $? -ne 0 ] diff --git a/test/test203 b/test/script-tests/test203 similarity index 91% rename from test/test203 rename to test/script-tests/test203 index d6667e2..1e83569 100755 --- a/test/test203 +++ b/test/script-tests/test203 @@ -3,7 +3,7 @@ echo "Test203: test subshell" echo "ls test3* > file-list " > shell-in echo "ls -al \`cat file-list\` " >> shell-in -../shell < shell-in > shell-out +${SHELL_BIN} < shell-in > shell-out echo "ls test3* > file-list" > csh-in echo "ls -al \`cat file-list\` " >> csh-in diff --git a/test/test204 b/test/script-tests/test204 similarity index 93% rename from test/test204 rename to test/script-tests/test204 index 60a571f..a56a672 100755 --- a/test/test204 +++ b/test/script-tests/test204 @@ -10,7 +10,7 @@ echo "ls ~cs180 >> out2" >> shell-in echo "ls ~cs180/share >> out2" >> shell-in /bin/bash < csh-in > csh-out -../shell < shell-in > shell-out +${SHELL_BIN} < shell-in > shell-out diff out1 out2 > /dev/null 2>&1 diff --git a/test/test3 b/test/script-tests/test3 similarity index 91% rename from test/test3 rename to test/script-tests/test3 index 4b3ae9a..74070bf 100755 --- a/test/test3 +++ b/test/script-tests/test3 @@ -6,7 +6,7 @@ echo "ls /none >& err1" > yash-in echo "ls /none &> err2" > bash-in /bin/bash < bash-in -../src/yash < yash-in +${SHELL_BIN} < yash-in diff ./err1 ./err2 diff --git a/test/test3-2 b/test/script-tests/test3-2 similarity index 92% rename from test/test3-2 rename to test/script-tests/test3-2 index 049b4c5..9e09232 100755 --- a/test/test3-2 +++ b/test/script-tests/test3-2 @@ -9,7 +9,7 @@ echo "ls files > out2" >> csh-in echo "ls files >> out2" >> csh-in /bin/sh < csh-in > csh-out -../shell < shell-in > shell-out +${SHELL_BIN} < shell-in > shell-out diff out1 out2 if [ $? -ne 0 ] diff --git a/test/test3-3 b/test/script-tests/test3-3 similarity index 85% rename from test/test3-3 rename to test/script-tests/test3-3 index 9718d62..50dea12 100755 --- a/test/test3-3 +++ b/test/script-tests/test3-3 @@ -6,7 +6,7 @@ echo "/bin/ls notfound >& err1" > shell-in echo "/bin/ls notfound > err2 2>&1" > csh-in /bin/sh < csh-in > csh-out 2>&1 -../shell < shell-in > shell-out 2>&1 +${SHELL_BIN} < shell-in > shell-out 2>&1 diff err1 err2 if [ $? -ne 0 ] @@ -19,7 +19,7 @@ echo "ls notfound >>& err1" > shell-in echo "ls notfound >> err2 2>&1" > csh-in /bin/sh < csh-in > csh-out 2>&1 -../shell < shell-in > shell-out 2>&1 +${SHELL_BIN} < shell-in > shell-out 2>&1 diff err1 err2 if [ $? -ne 0 ] diff --git a/test/test4 b/test/script-tests/test4 similarity index 85% rename from test/test4 rename to test/script-tests/test4 index 0105073..0709704 100755 --- a/test/test4 +++ b/test/script-tests/test4 @@ -3,7 +3,7 @@ rm -f out1 out2 rm -f csh-out shell-out echo "Test4: Multiple redirection" echo "ls > out1 > out2" > shell-in -../shell < shell-in > shell-out 2>&1 +${SHELL_BIN} < shell-in > shell-out 2>&1 grep "Ambiguous output redirect" shell-out if [ $? -ne 0 ] diff --git a/test/test5 b/test/script-tests/test5 similarity index 86% rename from test/test5 rename to test/script-tests/test5 index 8b5a29f..149718d 100755 --- a/test/test5 +++ b/test/script-tests/test5 @@ -4,7 +4,7 @@ rm -f csh-out shell-out echo "Test5: 2 Pipes" echo "cat file1.cc | grep malloc" > shell-in /bin/sh < shell-in > csh-out -../shell < shell-in > shell-out +${SHELL_BIN} < shell-in > shell-out diff shell-out csh-out if [ $? -ne 0 ] diff --git a/test/test6 b/test/script-tests/test6 similarity index 87% rename from test/test6 rename to test/script-tests/test6 index 898a7ac..b8c6529 100755 --- a/test/test6 +++ b/test/script-tests/test6 @@ -4,7 +4,7 @@ rm -f csh-out shell-out echo "Test6: 3 Pipes" echo "cat file1.cc | grep malloc | grep char" > shell-in /bin/sh < shell-in > csh-out -../shell < shell-in > shell-out +${SHELL_BIN} < shell-in > shell-out diff shell-out csh-out if [ $? -ne 0 ] diff --git a/test/test7 b/test/script-tests/test7 similarity index 89% rename from test/test7 rename to test/script-tests/test7 index 0156d95..2c078dc 100755 --- a/test/test7 +++ b/test/script-tests/test7 @@ -4,7 +4,7 @@ echo "Test7: Pipes and output redirection" echo "cat file1.cc | grep malloc > out1" > shell-in echo "cat file1.cc | grep malloc > out2" > csh-in /bin/sh < csh-in > csh-out -../shell < shell-in > shell-out +${SHELL_BIN} < shell-in > shell-out diff out1 out2 if [ $? -ne 0 ] diff --git a/test/test8 b/test/script-tests/test8 similarity index 88% rename from test/test8 rename to test/script-tests/test8 index 1f869cc..a01a50c 100755 --- a/test/test8 +++ b/test/script-tests/test8 @@ -4,7 +4,7 @@ echo "Test8: Pipes and error redirection" echo "cat file1.cc | ls nonexisting >& err1" > shell-in echo "cat file1.cc | ls nonexisting > err2 2>&1" > csh-in /bin/sh < csh-in > csh-out 2>&1 -../shell < shell-in > shell-out 2>&1 +${SHELL_BIN} < shell-in > shell-out 2>&1 diff err1 err2 if [ $? -ne 0 ] diff --git a/test/test9 b/test/script-tests/test9 similarity index 84% rename from test/test9 rename to test/script-tests/test9 index af2e518..2f4a44b 100755 --- a/test/test9 +++ b/test/script-tests/test9 @@ -4,7 +4,7 @@ rm -f csh-out shell-out echo "Test9: Background" echo "sleep 5 &" > shell-in echo "touch bgfile" >> shell-in -../shell < shell-in > shell-out & +${SHELL_BIN} < shell-in > shell-out & sleep 1 if [ ! -f bgfile ] diff --git a/test/testall b/test/script-tests/testall similarity index 100% rename from test/testall rename to test/script-tests/testall