From 5dd0a7260bb59125de3aa542d699d25f431e191c Mon Sep 17 00:00:00 2001 From: arzelcm Date: Tue, 16 Jul 2024 19:26:37 +0200 Subject: [PATCH] Delete unnecessary things for intra --- tests/SHLVL-cond | 8 - tests/amethyst-test.sh | 464 ------- tests/cmd | 26 - tests/correct_test | 2750 ---------------------------------------- tests/shlvl.sh | 13 - tests/testers.md | 2 - tests/use_cases | 389 ------ 7 files changed, 3652 deletions(-) delete mode 100644 tests/SHLVL-cond delete mode 100644 tests/amethyst-test.sh delete mode 100644 tests/cmd delete mode 100644 tests/correct_test delete mode 100644 tests/shlvl.sh delete mode 100644 tests/testers.md delete mode 100644 tests/use_cases diff --git a/tests/SHLVL-cond b/tests/SHLVL-cond deleted file mode 100644 index 1ada59c..0000000 --- a/tests/SHLVL-cond +++ /dev/null @@ -1,8 +0,0 @@ -(shlvl_range) -> "NEW_SHLVL_VALUE", "Message" --- -(!is_num(n)) -> "1" -(n == 999) -> "", NULL -(n >= INT_MAX) -> "0", NULL -(n > 999) -> "1", "bash: warning: shell level (10001) too high, resetting to 1\n" -(n < -1) -> "1", NULL -(n >= -1) -> "n + 1", NULL \ No newline at end of file diff --git a/tests/amethyst-test.sh b/tests/amethyst-test.sh deleted file mode 100644 index f228505..0000000 --- a/tests/amethyst-test.sh +++ /dev/null @@ -1,464 +0,0 @@ -#!/bin/bash -# MINISHELL-TESTER -# Modified copy of https://github.com/solaldunckel/minishell-tester - -RESET="\033[0m" -BLACK="\033[30m" -RED="\033[31m" -GREEN="\033[32m" -YELLOW="\033[33m" -BLUE="\033[34m" -MAGENTA="\033[35m" -CYAN="\033[36m" -WHITE="\033[37m" -YELLOW="\033[1;33m" - -BOLDBLACK="\033[1m\033[30m" -BOLDRED="\033[1m\033[31m" -BOLDGREEN="\033[1m\033[32m" -BOLDYELLOW="\033[1m\033[33m" -BOLDBLUE="\033[1m\033[34m" -BOLDMAGENTA="\033[1m\033[35m" -BOLDCYAN="\033[1m\033[36m" -BOLDWHITE="\033[1m\033[37m" - -PASSED=0 -WRONG=0 -TOTAL=0 -IS_CORRECT=0 - -function exec_test() -{ - IS_CORRECT=0 - $(echo "$@" > testin) - TEST1=$(< testin ./minishell 2>1) - ES_1=$? - TEST2=$(< testin bash 2>1) - ES_2=$? - if [ "$TEST1" == "$TEST2" ] && [ "$ES_1" == "$ES_2" ]; then - ((PASSED++)) - IS_CORRECT=1 - else - ((WRONG++)) - printf $CYAN"$@$RESET\n" - fi - if [ "$TEST1" != "$TEST2" ]; then - printf $BOLDRED"Your output : \n%.20s\n$BOLDRED$TEST1\n%.20s$RESET\n" "-----------------------------------------" "-----------------------------------------" - printf $BOLDGREEN"Expected output : \n%.20s\n$BOLDGREEN$TEST2\n%.20s$RESET\n\n" "-----------------------------------------" "-----------------------------------------" - fi - if [ "$ES_1" != "$ES_2" ]; then - printf $BOLDRED"Your exit status : $BOLDRED$ES_1$RESET\n" - printf $BOLDGREEN"Expected exit status : $BOLDGREEN$ES_2$RESET\n\n" - fi - if [ "$IS_CORRECT" == "0" ]; then - printf "\n\n" - fi - ((TOTAL++)) - sleep 0.1 -} - -function exec_test_mult() -{ - IS_CORRECT=0 - $(echo "$ARG1" > testin) - TEST1=$(< testin ./minishell 2>1) - ES_1=$? - $(echo "$ARG2" > testin) - TEST2=$(< testin bash 2>1) - ES_2=$? - if [ "$TEST1" == "$TEST2" ] && [ "$ES_1" == "$ES_2" ]; then - ((PASSED++)) - IS_CORRECT=1 - else - ((WRONG++)) - echo - printf $BOLDRED"$ARG1$RESET\n" - printf $BOLDGREEN"$ARG2$RESET\n" - echo - fi - if [ "$TEST1" != "$TEST2" ]; then - printf $BOLDRED"Your output : \n%.20s\n$BOLDRED$TEST1\n%.20s$RESET\n" "-----------------------------------------" "-----------------------------------------" - printf $BOLDGREEN"Expected output : \n%.20s\n$BOLDGREEN$TEST2\n%.20s$RESET\n\n" "-----------------------------------------" "-----------------------------------------" - fi - if [ "$ES_1" != "$ES_2" ]; then - printf $BOLDRED"Your exit status : $BOLDRED$ES_1$RESET\n" - printf $BOLDGREEN"Expected exit status : $BOLDGREEN$ES_2$RESET\n\n" - fi - if [ "$IS_CORRECT" == "0" ]; then - printf "\n\n" - fi - ((TOTAL++)) - sleep 0.1 -} - -echo -bash --version -echo -printf "$BOLDMAGENTA __ __ _____ _ _ _____ _____ _ _ ______ _ _ \n" -printf "| \/ |_ _| \ | |_ _|/ ____| | | | ____| | | | \n" -printf "| \ / | | | | \| | | | | (___ | |__| | |__ | | | | \n" -printf "| |\/| | | | | . \` | | | \___ \| __ | __| | | | | \n" -printf "| | | |_| |_| |\ |_| |_ ____) | | | | |____| |____| |____ \n" -printf "|_| |_|_____|_| \_|_____|_____/|_| |_|______|______|______|\n$RESET" -echo -echo - -printf $YELLOW"ECHO\n\n$RESET" -exec_test 'echo test tout' -exec_test 'echo test tout' -exec_test 'echo -n test tout' -exec_test 'echo -n -n -n test tout' -exec_test 'echo' -exec_test 'echo Ʊ' -exec_test 'echo hi' -exec_test '/bin/echo hi' -exec_test 'echo $PATH' -exec_test 'echo $NOFNAJDFKADFKADJFKJ' -exec_test 'echoecho' -exec_test 'echo -n' -exec_test 'echo -n hi' -exec_test 'echo --n hi' -exec_test 'echo -nn hi' -exec_test 'echo -n -n hi' -exec_test 'echo hi -n' -exec_test 'echo "-n -n -n" -n hi' -exec_test 'echo -nnnnnnn -n -nnnnnnnnnnnn -n -n hi' -exec_test 'echo -nn -n -nnnnnnnnnnnn -n -n -n-n hi' -exec_test 'echo -nn -n -nnnnnnnnnnnn -n -n -n-n hi -nnn -n -n' -exec_test 'echo "-nnnnnn -nnnnn" hi' -exec_test 'echo $?USER' -exec_test 'echo "$?USER"' -exec_test 'echo "$?USER" $? $?USER $USER $USER' - - -printf $YELLOW"CD\n\n$RESET" -exec_test 'cd .. -pwd' -exec_test 'cd /Users -pwd' -exec_test 'cd -pwd' -# exec_test 'mkdir test_dir -# cd test_dir -# rm -rf ../test_dir -# cd . -# pwd -# cd . -# pwd -# cd .. -# pwd' - - -printf $YELLOW"PIPE\n\n$RESET" -exec_test 'cat tests/lorem.txt | grep arcu | cat -e' -exec_test 'echo test | cat -e | cat -e | cat -e | cat -e | cat -e | cat -e | cat -e | cat -e | cat -e | cat -e| cat -e| cat -e| cat -e| cat -e| cat -e| cat -e| cat -e| cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e' -exec_test 'cat /dev/random | head -c 100 | wc -c' -exec_test 'ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls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ec_test 'echo $TEST$TEST=lol$TEST""lol' -exec_test 'echo $TEST lol $TEST' -exec_test 'echo test "" test "" test' -exec_test 'echo "$=TEST"' -exec_test 'echo "$"' -exec_test 'echo "$?TEST"' -exec_test 'echo $TEST $TEST' -exec_test 'echo "$T1TEST"' - - -printf $YELLOW"EXIT\n\n$RESET" -exec_test "exit 42" -exec_test "exit 42 53 68" -exec_test "exit 259" -exec_test "exit 9223372036854775807" -exec_test "exit -9223372036854775808" -exec_test "exit 9223372036854775808" -exec_test "exit -9223372036854775810" -exec_test "exit -4" -exec_test "exit wrong" -exec_test "exit wrong_command" -exec_test "gdagadgag" -exec_test "ls -Z" -exec_test "cd gdhahahad" -exec_test "ls -la | wtf" -exec_test "echo \"\"" -exec_test "exit" -exec_test "exit \"\"" -exec_test "exit \" \"" -exec_test "exit \" \"" -exec_test "exit \" \"" -exec_test "exit 42network" -exec_test "exit +" -exec_test "exit ++" -exec_test "exit -" -exec_test "exit ---" -exec_test "exit 0" -exec_test "exit +0" -exec_test "exit ++0" -exec_test "exit -0" -exec_test "exit --0" -exec_test "exit 1" -exec_test "exit +1" -exec_test "exit ++1" -exec_test "exit -1" -exec_test "exit --1" -exec_test "exit ' 3'" -exec_test "exit '3 '" -exec_test "exit 255" -exec_test "exit -255" -exec_test "exit 256" -exec_test "exit 2147483647" -exec_test "exit 2147483648" -exec_test "exit -2147483648" -exec_test "exit -2147483649" -exec_test "exit 4294967295" -exec_test "exit 4294967296" -exec_test "exit -4294967296" -exec_test "exit -4294967297" -exec_test "exit 9223372036854775807" -exec_test "exit 9223372036854775808" -exec_test "exit -9223372036854775808" -exec_test "exit -9223372036854775809" -exec_test "exit 18446744073709551615" -exec_test "exit 18446744073709551616" -exec_test "exit -18446744073709551616" -exec_test "exit -18446744073709551617" -exec_test "exit 9999999999999999999999" -exec_test "exit 0000000000000000000000" -exec_test "exit 0000000000000000000001" -exec_test "exit 1 2 3" -exec_test "exit 1 2 3 -echo should not exit" -exec_test "exit 1 not numeric bro" -exec_test "exit not numeric bro 2" -exec_test "exit 42 | cat" -exec_test "Exit 1 -echo is not a builtin" -exec_test "aaa -exit 1" -exec_test "touch testingfile -chmod 000 testingfile" -exec_test "cat testingfile -exit" -exec_test "cat testingfile -exit 1" -exec_test "cat src -exit" -exec_test "cat src -exit 1" -exec_test "cafkajdkf -exit" -exec_test "calfakfkakd -exit 1" -exec_test "cat Makefile -exit" -exec_test "cat Makefile -exit 1" -exec_test "cat /bin -exit" -exec_test "cat /bin -exit 1" -exec_test "chmod 777 testingfile -rm -rf testingfile" - - -printf $YELLOW"ENV EXPANSIONS\n\n$RESET" -ENV_SHOW="env | sort | grep -v SHLVL | grep -v _=" -EXPORT_SHOW="export | sort | grep -v SHLVL | grep -v _= | grep -v OLDPWD" -exec_test 'export =' -exec_test 'export 1TEST= -' $ENV_SHOW -exec_test 'export TEST -' $EXPORT_SHOW -exec_test 'export ""="" -' $ENV_SHOW -exec_test 'export TES=T="" -' $ENV_SHOW -exec_test 'export TE+S=T="" -' $ENV_SHOW -exec_test 'export TEST=LOL -echo $TEST -' $ENV_SHOW -exec_test 'export TEST=LOL -echo $TEST$TEST$TEST=lol$TEST' -exec_test 'export TEST=LOL -export TEST+=LOL -echo $TEST -' $ENV_SHOW -exec_test $ENV_SHOW -exec_test $EXPORT_SHOW -exec_test 'export TEST="ls -l - a" -echo $TEST -$LS -' $ENV_SHOW - - -printf $YELLOW"PIPE\n\n$RESET" -exec_test 'cat tests/lorem.txt | grep arcu | cat -e' -exec_test 'echo test | cat -e | cat -e | cat -e | cat -e | cat -e | cat -e | cat -e | cat -e | cat -e | cat -e| cat -e| cat -e| cat -e| cat -e| cat -e| cat -e| cat -e| cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e' -exec_test 'cat /dev/random | head -c 100 | wc -c' -exec_test 'ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls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ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls' - - -printf $YELLOW"REDIRECTIONS\n\n$RESET" -exec_test 'echo test > ls -cat ls' -exec_test 'echo test > ls >> ls >> ls - echo test >> ls - cat ls' -exec_test '> lol echo test lol - cat lol' -exec_test '>lol echo > test>lol>test>>lol>test mdr >lol test >test - cat test' -exec_test 'cat < ls' -exec_test 'cat < ls > ls' - - -printf $YELLOW"SYNTAX ERROR\n\n$RESET" -exec_test '| test' -exec_test 'echo > <' -exec_test 'echo | |' -exec_test '<' - - -printf $YELLOW"EXPAND ARGUMENTS\n\n$RESET" -exec_test 'export x="1 a 2" -exit "$x"$x"$x"' -exec_test 'export x="a 2" -exit "$x"$x"$x"' -exec_test 'export x="1 b" -exit "$x"$x"$x"' -exec_test 'export x="1 2" -exit "$x"$x"$x"' -exec_test 'export x="12" -exit "$x"$x"$x"' -exec_test 'export x="12a" -exit "$x"$x"$x"' -exec_test 'export x="1" -exit "$x"$x"$x"' -exec_test 'export x="a b" -echo "$x"$x"$x" -cat "$x"$x"$x"' -exec_test 'export x="a b" -echo ""1"x"$x $x$x"$x$x" $x$x"$x" "$x"$x"$x" -cat echo ""1"x"$x $x$x"$x$x" $x$x"$x" "$x"$x"$x"' -exec_test 'export x=" ab " -echo "$x"$x"$x" -cat "$x"$x"$x"' -exec_test 'export x=" ab " -echo echo ""1"x"$x $x$x"$x$x" $x$x"$x" "$x"$x"$x" -cat echo ""1"x"$x $x$x"$x$x" $x$x"$x" "$x"$x"$x"' -exec_test 'export x=" a b " -echo "$x"$x"$x" -cat "$x"$x"$x"' -exec_test 'export x=" a b " -echo echo ""1"x"$x $x$x"$x$x" $x$x"$x" "$x"$x"$x" -cat echo ""1"x"$x $x$x"$x$x" $x$x"$x" "$x"$x"$x"' -exec_test 'export x=" a b" -echo "$x"$x"$x" -cat "$x"$x"$x"' -exec_test 'export x=" a b" -echo echo ""1"x"$x $x$x"$x$x" $x$x"$x" "$x"$x"$x" -cat echo ""1"x"$x $x$x"$x$x" $x$x"$x" "$x"$x"$x"' -exec_test 'export x="a b " -echo "$x"$x"$x" -cat "$x"$x"$x"' -exec_test 'export x="a b " -echo echo ""1"x"$x $x$x"$x$x" $x$x"$x" "$x"$x"$x" -cat echo ""1"x"$x $x$x"$x$x" $x$x"$x" "$x"$x"$x"' -exec_test 'export x=" ab ab a b " -echo "$x"$x"$x" -cat "$x"$x"$x"' -exec_test 'export x=" ab ab a b " -echo echo ""1"x"$x $x$x"$x$x" $x$x"$x" "$x"$x"$x" -cat echo ""1"x"$x $x$x"$x$x" $x$x"$x" "$x"$x"$x"' -exec_test 'export x="a b c" -export z="" -echo "$z$x$z"$z$x$z"$z$x$z"$z -cat "$z$x$z"$z$x$z"$z$x$z"$z' -exec_test 'export x="a b c" -export y="" -echo "$y"1"x"$x ""$y $y$y$y$y $y$y$y$y $y$y$y$y "$x$x""$x""$x""" $x$x"$x" $y"$x"$x"$x"$y -cat "$y"1"x"$x ""$y $y$y$y$y $y$y$y$y $y$y$y$y "$x$x""$x""$x""" $x$x"$x" $y"$x"$x"$x"$y' -exec_test "echo \"\" '' -cat \"\" ''" - - -printf $YELLOW"EXPAND REDIRECTIONS\n\n$RESET" -exec_test 'export x="test file" -echo "testing..." > $x' -exec_test 'export x=" test file " -echo "testing..." > $x' -exec_test 'export x=" test file" -echo "testing..." > $x' -exec_test 'export x="test file " -echo "testing..." > $x' -exec_test 'export x="testfile" -echo "testing..." > $x -rm -rf testfile' -exec_test 'export x=" testfile " -echo "testing..." > $x -rm -rf testfile' -exec_test 'export x="te" -export y="st" -export z="fi" -export zz="le" -echo "testing..." > "$x"$y"$z"$zz -rm -rf testfile' -exec_test 'export x="te" -export y="sssssst" -export z="fi" -export zz="le" -echo "testing..." > "$x"$y "$z" -rm -rf tesssssst' - - -function testshlvl() -{ - echo 'echo $SHLVL' > tmptest - ARG1="export SHLVL=$@ - ./minishell < tmptest | tr -s '[:blank:]'" - ARG2="export SHLVL=$@ - bash < tmptest | tr -s '[:blank:]'" - exec_test_mult $ARG1 $ARG2 -} -testshlvl '-1' -testshlvl '-900' -testshlvl '-992' -testshlvl '-994' -testshlvl '-996' -testshlvl '-998' -testshlvl '-9' -testshlvl '' -testshlvl 'aaaa' -testshlvl '-1asdasdads' -testshlvl 'a-1' -testshlvl "1000" -testshlvl "123992138192381293819238129381293812391823192381923819238192381923819283192839123898" -testshlvl "-123992138192381293819238129381293812391823192381923819238192381923819283192839123898" -testshlvl "999" - - -echo -if [ "$PASSED" == "$TOTAL" ]; then - printf "šŸ§ŠšŸ§šŸ§Š Pingu is here !!!!!\n\nāœ… YOU MADE IT! $BOLDGREEN($TOTAL / $TOTAL) $RESET\n" -else - printf $BOLDRED"Wrong: $WRONG$RESET$BOLDGREEN Passed: $PASSED$RESET Total: $TOTAL" -fi -echo -echo - - -rm testin lol ls test tmptest 1 - - -exit $WRONG \ No newline at end of file diff --git a/tests/cmd b/tests/cmd deleted file mode 100644 index 369c67a..0000000 --- a/tests/cmd +++ /dev/null @@ -1,26 +0,0 @@ -date -ls -ls | ls -ls | ls | ls -ls>3 | ls>2 | ls>1 -((ls)) -(ls) -(ls | ls | ls) -(ls | ls | ls) | ls -ls | (ls | ls | ls) -ls | (ls | ls | ls) | ls -(ls | (cat | cat) | ls) -(((((((((((((((((((((((((ls))))))))))))))))))))))))) -(((((((((((((((((((((((((ls>cmdout1)>2)>3)>4)>5)>6)>7)>8)>9)>10)>11)>12)>13)>14)>15)>16)>17)>18)>19)>20)>21)>22)>23)>24)>25 -(((((((((((((((((((((((((ls | ls)) | ls | ls | (ls | ls | ls)))))))))))))))))))))))) -((ls| cat |cat |(ls | cat | (ls | cat | cat | echo) | ls))) -((ls| cat |cat |(ls | cat | (ls | cat | cat | echo) | (echo | cat | echo) | (ls)| (((((ls) | cat) |cat ) | cat) | ls) | ls | cat |cat| ( ls | cat) | ls| cat |ls| cat| ls| cat|ls)) | ls) > file -ls && ls -ls && ls && ls -(ls) && (ls) -ls && (ls | ls | ls) && cat -((ls | ls) && ls | ls | ls | ls | cat && (date | date)) -ls || cat | ls | (cat || ls && (cat | ls) | cat) && ls -(ls || (cat) && ls | (cat | ls && ls)) -ls && (cat < caca| ls>fola || ls << 3 | (cat && (ls | ls | (cat | ls && (ls) > xdd|| ls | (ls | cat || ls |(ls && ls && (ls) && ls) | ls << 6 | ls) && ls) && ls && ls) | cat >> mimi) | ls)momo -(>file) | (ls || cat && cat && cat || ls) < file > file2 | (ls | (cat && ls)) << heredoc >> append \ No newline at end of file diff --git a/tests/correct_test b/tests/correct_test deleted file mode 100644 index e1c2307..0000000 --- a/tests/correct_test +++ /dev/null @@ -1,2750 +0,0 @@ -GRANDPARENT: -token -TYPE: 0 -argc: 1 -args: date, -redirections: -tokens: 1 -Fri Jul 12 18:48:55 CEST 2024 -GRANDPARENT: -token -TYPE: 0 -argc: 1 -args: ls, -redirections: -tokens: 1 -Makefile -README.md -bin -cmd -correct_result -correct_test -inc -lib -log -minishell -minishell_tester -pwd -src -testlala -tests -GRANDPARENT: -token -TYPE: 2 -argc: 0 -args: -redirections: -tokens: 2 - -Child 0 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 -Makefile -README.md -bin -cmd -correct_result -correct_test -inc -lib -log -minishell -minishell_tester -pwd -src -testlala -tests -GRANDPARENT: -token -TYPE: 2 -argc: 0 -args: -redirections: -tokens: 3 - -Child 0 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 2 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 -Makefile -README.md -bin -cmd -correct_result -correct_test -inc -lib -log -minishell -minishell_tester -pwd -src -testlala -tests -GRANDPARENT: -token -TYPE: 2 -argc: 0 -args: -redirections: -tokens: 3 - -Child 0 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: 3(2), -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: 2(2), -tokens: 1 - -Child 2 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: 1(2), -tokens: 1 -GRANDPARENT: -token -TYPE: 1 -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 0 -parent: (1) -argc: 1 -args: ls, -redirections: -tokens: 1 -GRANDPARENT: -token -TYPE: 1 -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 0 -parent: (1) -argc: 1 -args: ls, -redirections: -tokens: 1 -GRANDPARENT: -token -TYPE: 1 -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 2 -parent: (1) -argc: 0 -args: -redirections: -tokens: 3 - -Child 0 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 2 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 -GRANDPARENT: -token -TYPE: 2 -argc: 0 -args: -redirections: -tokens: 2 - -Child 0 -token -TYPE: 1 -parent: (2) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 2 -parent: (1) -argc: 0 -args: -redirections: -tokens: 3 - -Child 0 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 2 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 -1 -2 -3 -Makefile -README.md -bin -cmd -correct_result -correct_test -inc -lib -log -minishell -minishell_tester -pwd -src -testlala -tests -GRANDPARENT: -token -TYPE: 2 -argc: 0 -args: -redirections: -tokens: 2 - -Child 0 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 1 -parent: (2) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 2 -parent: (1) -argc: 0 -args: -redirections: -tokens: 3 - -Child 0 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 2 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 -GRANDPARENT: -token -TYPE: 2 -argc: 0 -args: -redirections: -tokens: 3 - -Child 0 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 1 -parent: (2) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 2 -parent: (1) -argc: 0 -args: -redirections: -tokens: 3 - -Child 0 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 2 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 2 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 -1 -2 -3 -Makefile -README.md -bin -cmd -correct_result -correct_test -inc -lib -log -minishell -minishell_tester -pwd -src -testlala -tests -GRANDPARENT: -token -TYPE: 1 -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 2 -parent: (1) -argc: 0 -args: -redirections: -tokens: 3 - -Child 0 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 1 -parent: (2) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 2 -parent: (1) -argc: 0 -args: -redirections: -tokens: 2 - -Child 0 -token -TYPE: 0 -parent: (2) -argc: 1 -args: cat, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (2) -argc: 1 -args: cat, -redirections: -tokens: 1 - -Child 2 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 -GRANDPARENT: -token -TYPE: 1 -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 0 -parent: (1) -argc: 1 -args: ls, -redirections: -tokens: 1 -GRANDPARENT: -token -TYPE: 1 -argc: 0 -args: -redirections: 25(2), -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: 24(2), -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: 23(2), -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: 22(2), -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: 21(2), -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: 20(2), -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: 19(2), -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: 18(2), -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: 17(2), -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: 16(2), -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: 15(2), -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: 14(2), -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: 13(2), -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: 12(2), -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: 11(2), -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: 10(2), -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: 9(2), -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: 8(2), -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: 7(2), -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: 6(2), -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: 5(2), -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: 4(2), -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: 3(2), -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: 2(2), -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: 1(2), -tokens: 1 - -Child 0 -token -TYPE: 0 -parent: (1) -argc: 1 -args: ls, -redirections: cmdout(2), cmdin(1), -tokens: 1 -GRANDPARENT: -token -TYPE: 1 -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 2 -parent: (1) -argc: 0 -args: -redirections: -tokens: 4 - -Child 0 -token -TYPE: 1 -parent: (2) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 2 -parent: (1) -argc: 0 -args: -redirections: -tokens: 2 - -Child 0 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 2 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 3 -token -TYPE: 1 -parent: (2) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 2 -parent: (1) -argc: 0 -args: -redirections: -tokens: 3 - -Child 0 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 2 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 -GRANDPARENT: -token -TYPE: 1 -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 1 -parent: (1) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 2 -parent: (1) -argc: 0 -args: -redirections: -tokens: 4 - -Child 0 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (2) -argc: 1 -args: cat, -redirections: -tokens: 1 - -Child 2 -token -TYPE: 0 -parent: (2) -argc: 1 -args: cat, -redirections: -tokens: 1 - -Child 3 -token -TYPE: 1 -parent: (2) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 2 -parent: (1) -argc: 0 -args: -redirections: -tokens: 4 - -Child 0 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (2) -argc: 1 -args: cat, -redirections: -tokens: 1 - -Child 2 -token -TYPE: 1 -parent: (2) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 2 -parent: (1) -argc: 0 -args: -redirections: -tokens: 4 - -Child 0 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (2) -argc: 1 -args: cat, -redirections: -tokens: 1 - -Child 2 -token -TYPE: 0 -parent: (2) -argc: 1 -args: cat, -redirections: -tokens: 1 - -Child 3 -token -TYPE: 0 -parent: (2) -argc: 1 -args: echo, -redirections: -tokens: 1 - -Child 3 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 -GRANDPARENT: -token -TYPE: 1 -argc: 0 -args: -redirections: file(2), -tokens: 1 - -Child 0 -token -TYPE: 2 -parent: (1) -argc: 0 -args: -redirections: -tokens: 2 - -Child 0 -token -TYPE: 1 -parent: (2) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 2 -parent: (1) -argc: 0 -args: -redirections: -tokens: 4 - -Child 0 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (2) -argc: 1 -args: cat, -redirections: -tokens: 1 - -Child 2 -token -TYPE: 0 -parent: (2) -argc: 1 -args: cat, -redirections: -tokens: 1 - -Child 3 -token -TYPE: 1 -parent: (2) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 2 -parent: (1) -argc: 0 -args: -redirections: -tokens: 17 - -Child 0 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (2) -argc: 1 -args: cat, -redirections: -tokens: 1 - -Child 2 -token -TYPE: 1 -parent: (2) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 2 -parent: (1) -argc: 0 -args: -redirections: -tokens: 4 - -Child 0 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (2) -argc: 1 -args: cat, -redirections: -tokens: 1 - -Child 2 -token -TYPE: 0 -parent: (2) -argc: 1 -args: cat, -redirections: -tokens: 1 - -Child 3 -token -TYPE: 0 -parent: (2) -argc: 1 -args: echo, -redirections: -tokens: 1 - -Child 3 -token -TYPE: 1 -parent: (2) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 2 -parent: (1) -argc: 0 -args: -redirections: -tokens: 3 - -Child 0 -token -TYPE: 0 -parent: (2) -argc: 1 -args: echo, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (2) -argc: 1 -args: cat, -redirections: -tokens: 1 - -Child 2 -token -TYPE: 0 -parent: (2) -argc: 1 -args: echo, -redirections: -tokens: 1 - -Child 4 -token -TYPE: 1 -parent: (2) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 0 -parent: (1) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 5 -token -TYPE: 1 -parent: (2) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 2 -parent: (1) -argc: 0 -args: -redirections: -tokens: 2 - -Child 0 -token -TYPE: 1 -parent: (2) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 2 -parent: (1) -argc: 0 -args: -redirections: -tokens: 2 - -Child 0 -token -TYPE: 1 -parent: (2) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 2 -parent: (1) -argc: 0 -args: -redirections: -tokens: 2 - -Child 0 -token -TYPE: 1 -parent: (2) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 2 -parent: (1) -argc: 0 -args: -redirections: -tokens: 2 - -Child 0 -token -TYPE: 1 -parent: (2) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 0 -parent: (1) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (2) -argc: 1 -args: cat, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (2) -argc: 1 -args: cat, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (2) -argc: 1 -args: cat, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 6 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 7 -token -TYPE: 0 -parent: (2) -argc: 1 -args: cat, -redirections: -tokens: 1 - -Child 8 -token -TYPE: 0 -parent: (2) -argc: 1 -args: cat, -redirections: -tokens: 1 - -Child 9 -token -TYPE: 1 -parent: (2) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 2 -parent: (1) -argc: 0 -args: -redirections: -tokens: 2 - -Child 0 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (2) -argc: 1 -args: cat, -redirections: -tokens: 1 - -Child 10 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 11 -token -TYPE: 0 -parent: (2) -argc: 1 -args: cat, -redirections: -tokens: 1 - -Child 12 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 13 -token -TYPE: 0 -parent: (2) -argc: 1 -args: cat, -redirections: -tokens: 1 - -Child 14 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 15 -token -TYPE: 0 -parent: (2) -argc: 1 -args: cat, -redirections: -tokens: 1 - -Child 16 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 -GRANDPARENT: -token -TYPE: 3 -argc: 0 -args: -redirections: -tokens: 2 - -Child 0 -token -TYPE: 0 -parent: (3) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (3) -argc: 1 -args: ls, -redirections: -tokens: 1 -GRANDPARENT: -token -TYPE: 3 -argc: 0 -args: -redirections: -tokens: 2 - -Child 0 -token -TYPE: 3 -parent: (3) -argc: 0 -args: -redirections: -tokens: 2 - -Child 0 -token -TYPE: 0 -parent: (3) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (3) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (3) -argc: 1 -args: ls, -redirections: -tokens: 1 -GRANDPARENT: -token -TYPE: 3 -argc: 0 -args: -redirections: -tokens: 2 - -Child 0 -token -TYPE: 1 -parent: (3) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 0 -parent: (1) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 1 -parent: (3) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 0 -parent: (1) -argc: 1 -args: ls, -redirections: -tokens: 1 -GRANDPARENT: -token -TYPE: 3 -argc: 0 -args: -redirections: -tokens: 2 - -Child 0 -token -TYPE: 3 -parent: (3) -argc: 0 -args: -redirections: -tokens: 2 - -Child 0 -token -TYPE: 0 -parent: (3) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 1 -parent: (3) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 2 -parent: (1) -argc: 0 -args: -redirections: -tokens: 3 - -Child 0 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 2 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (3) -argc: 1 -args: cat, -redirections: -tokens: 1 -GRANDPARENT: -token -TYPE: 1 -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 3 -parent: (1) -argc: 0 -args: -redirections: -tokens: 2 - -Child 0 -token -TYPE: 3 -parent: (3) -argc: 0 -args: -redirections: -tokens: 2 - -Child 0 -token -TYPE: 1 -parent: (3) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 2 -parent: (1) -argc: 0 -args: -redirections: -tokens: 2 - -Child 0 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 2 -parent: (3) -argc: 0 -args: -redirections: -tokens: 5 - -Child 0 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 2 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 3 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 4 -token -TYPE: 0 -parent: (2) -argc: 1 -args: cat, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 1 -parent: (3) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 2 -parent: (1) -argc: 0 -args: -redirections: -tokens: 2 - -Child 0 -token -TYPE: 0 -parent: (2) -argc: 1 -args: date, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (2) -argc: 1 -args: date, -redirections: -tokens: 1 -GRANDPARENT: -token -TYPE: 3 -argc: 0 -args: -redirections: -tokens: 2 - -Child 0 -token -TYPE: 3 -parent: (3) -argc: 0 -args: -redirections: -tokens: 2 - -Child 0 -token -TYPE: 0 -parent: (3) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 2 -parent: (3) -argc: 0 -args: -redirections: -tokens: 3 - -Child 0 -token -TYPE: 0 -parent: (2) -argc: 1 -args: cat, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 2 -token -TYPE: 1 -parent: (2) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 3 -parent: (1) -argc: 0 -args: -redirections: -tokens: 2 - -Child 0 -token -TYPE: 3 -parent: (3) -argc: 0 -args: -redirections: -tokens: 2 - -Child 0 -token -TYPE: 0 -parent: (3) -argc: 1 -args: cat, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (3) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 2 -parent: (3) -argc: 0 -args: -redirections: -tokens: 2 - -Child 0 -token -TYPE: 1 -parent: (2) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 2 -parent: (1) -argc: 0 -args: -redirections: -tokens: 2 - -Child 0 -token -TYPE: 0 -parent: (2) -argc: 1 -args: cat, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (2) -argc: 1 -args: cat, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (3) -argc: 1 -args: ls, -redirections: -tokens: 1 -GRANDPARENT: -token -TYPE: 1 -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 3 -parent: (1) -argc: 0 -args: -redirections: -tokens: 2 - -Child 0 -token -TYPE: 3 -parent: (3) -argc: 0 -args: -redirections: -tokens: 2 - -Child 0 -token -TYPE: 0 -parent: (3) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 1 -parent: (3) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 0 -parent: (1) -argc: 1 -args: cat, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 2 -parent: (3) -argc: 0 -args: -redirections: -tokens: 2 - -Child 0 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 1 -parent: (2) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 3 -parent: (1) -argc: 0 -args: -redirections: -tokens: 2 - -Child 0 -token -TYPE: 2 -parent: (3) -argc: 0 -args: -redirections: -tokens: 2 - -Child 0 -token -TYPE: 0 -parent: (2) -argc: 1 -args: cat, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (3) -argc: 1 -args: ls, -redirections: -tokens: 1 -GRANDPARENT: -token -TYPE: 2 -argc: 0 -args: -redirections: -tokens: 3 - -Child 0 -token -TYPE: 1 -parent: (2) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 0 -parent: (1) -argc: 0 -args: -redirections: file(2), -tokens: 1 - -Child 1 -token -TYPE: 1 -parent: (2) -argc: 0 -args: -redirections: file(1), file2(2), -tokens: 1 - -Child 0 -token -TYPE: 3 -parent: (1) -argc: 0 -args: -redirections: -tokens: 2 - -Child 0 -token -TYPE: 3 -parent: (3) -argc: 0 -args: -redirections: -tokens: 2 - -Child 0 -token -TYPE: 3 -parent: (3) -argc: 0 -args: -redirections: -tokens: 2 - -Child 0 -token -TYPE: 3 -parent: (3) -argc: 0 -args: -redirections: -tokens: 2 - -Child 0 -token -TYPE: 0 -parent: (3) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (3) -argc: 1 -args: cat, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (3) -argc: 1 -args: cat, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (3) -argc: 1 -args: cat, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (3) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 2 -token -TYPE: 1 -parent: (2) -argc: 0 -args: -redirections: heredoc(0), append(3), -tokens: 1 - -Child 0 -token -TYPE: 2 -parent: (1) -argc: 0 -args: -redirections: -tokens: 2 - -Child 0 -token -TYPE: 0 -parent: (2) -argc: 1 -args: ls, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 1 -parent: (2) -argc: 0 -args: -redirections: -tokens: 1 - -Child 0 -token -TYPE: 3 -parent: (1) -argc: 0 -args: -redirections: -tokens: 2 - -Child 0 -token -TYPE: 0 -parent: (3) -argc: 1 -args: cat, -redirections: -tokens: 1 - -Child 1 -token -TYPE: 0 -parent: (3) -argc: 1 -args: ls, -redirections: -tokens: 1 diff --git a/tests/shlvl.sh b/tests/shlvl.sh deleted file mode 100644 index 5e45f01..0000000 --- a/tests/shlvl.sh +++ /dev/null @@ -1,13 +0,0 @@ -# echo "export SHLVL=-1; -# echo $SHLVL" > shlvltest -# ./minishell < shlvltest > shlvlres; -# cat shlvlres; - -test "export SHLVL=-1\necho"hola"" - -test() { - echo "$1" >.own_test - ./minishell < .own_test > .own_test_res; - cat .own_test_res; - # rm -f .own_test .own_test_res; -} diff --git a/tests/testers.md b/tests/testers.md deleted file mode 100644 index 3d65712..0000000 --- a/tests/testers.md +++ /dev/null @@ -1,2 +0,0 @@ -1. [minishell_tester](https://github.com/LucasKuhn/minishell_tester) -2. [tester.sh](https://github.com/solaldunckel/minishell-tester) \ No newline at end of file diff --git a/tests/use_cases b/tests/use_cases deleted file mode 100644 index b30a997..0000000 --- a/tests/use_cases +++ /dev/null @@ -1,389 +0,0 @@ -printf $YELLOW"ECHO\n\n$RESET" -exec_test 'echo test tout' -exec_test 'echo test tout' -exec_test 'echo -n test tout' -exec_test 'echo -n -n -n test tout' -exec_test 'echo' -exec_test 'echo Ʊ' -exec_test 'echo hi' -exec_test '/bin/echo hi' -exec_test 'echo $PATH' -exec_test 'echo $NOFNAJDFKADFKADJFKJ' -exec_test 'echoecho' -exec_test 'echo -n' -exec_test 'echo -n hi' -exec_test 'echo --n hi' -exec_test 'echo -nn hi' -exec_test 'echo -n -n hi' -exec_test 'echo hi -n' -exec_test 'echo "-n -n -n" -n hi' -exec_test 'echo -nnnnnnn -n -nnnnnnnnnnnn -n -n hi' -exec_test 'echo -nn -n -nnnnnnnnnnnn -n -n -n-n hi' -exec_test 'echo -nn -n -nnnnnnnnnnnn -n -n -n-n hi -nnn -n -n' -exec_test 'echo "-nnnnnn -nnnnn" hi' -exec_test 'echo $?USER' -exec_test 'echo "$?USER"' -exec_test 'echo "$?USER" $? $?USER $USER $USER' - - -printf $YELLOW"CD\n\n$RESET" -exec_test 'cd .. -pwd' -exec_test 'cd /Users -pwd' -exec_test 'cd -pwd' -exec_test 'mkdir test_dir -cd test_dir -rm -rf ../test_dir -cd . -pwd -cd . -pwd -cd .. -pwd' -exec_test 'pwd' -exec_test 'cd -pwd' -exec_test 'pwd -cd "" -pwd' -exec_test 'cd " "' -exec_test "cd ' '" -exec_test 'cd "" ""' -exec_test 'cd / fndjanf' -exec_test 'cd /.' -exec_test 'cd //' -exec_test "cd ' / '" -exec_test 'pwd' -exec_test 'pwd hola' -exec_test 'pwd hola adios' -exec_test 'touch testingfile -cd testingfile -chmod 000 testingfile -cd testingfile -cd testingfile/fadjkfjdakjfadkj -chmod 777 testingfile -rm -rf testingfile' -exec_test 'cd $HOME -cd fjakjfka' -exec_test 'cd .. -pwd' -exec_test 'cd $HOME -pwd' -exec_test 'cd . -env | grep PWD' -exec_test 'cd -env | grep PWD' -exec_test 'mkdir -p testingdirtest -chmod 000 testingdirtest -cd testingdirtest -chmod 777 testingdirtest -rm -rf testingdirtest' -exec_test 'cd 255chars255char255chars255char255chars255chars255chars255chars255chars255chars255chars255chars255chars255chars255chars255chars255chars255chars255chars255chars255chars255chars255chars255chars255chars255chars255chars255chars255chars255chars255chars255chars' -exec_test 'cd 255chars255chars255chars255char255chars255chars255chars255chars255chars255chars255chars255chars255chars255chars255chars255chars255chars255chars255chars255chars255chars255chars255chars255chars255chars255chars255chars255chars255chars255chars255chars255chars' - - -printf $YELLOW"EXPORT | UNSET | VARS\n\n$RESET" -exec_test 'echo hi -echo $?' -exec_test 'echo $' -exec_test 'echo hi$' -exec_test 'echo "$ ' -exec_test 'echo $/' -exec_test 'echo $"HOME"' -exec_test 'echo $"$HOME"' -exec_test 'echo $USER' -exec_test 'echo $fakdfkdj' -exec_test 'echo $USER$PATH$PWD' -exec_test 'echo "$USER$PATH$PWD"' -exec_test 'echo $"$USER$PATH$PWD"' -exec_test 'echo $USER"$PATH"$PWD$"$USER"' -exec_test 'echo $NFKAKFj' -exec_test 'export TMP -echo $TMP -$TMP' -exec_test '$KFJKEDJ $KJDKFJ' -exec_test '$JFDKJ' -exec_test 'export ecc=echo -$ecc' -exec_test 'export TMPENVVAR=" echo" -$TMPENVVAR' -exec_test 'export TMPENVVAR=" EcHO hi" -$TMPENVVAR' -exec_test 'export TMPENVVAR="-n" -echo $TMPENVVAR hi' -exec_test 'export TMPENVVAR="-n -n" -echo $TMPENVVAR $TMPENVVAR hi' -exec_test 'export A="foo " B=" bar" C=" baz " -echo $A"$B"$C"A"$B"$C" -echo $A"$B"$C"A"$B"$C" -echo $A"$B"$C"A"$B"$C" -echo $A -echo $A$B -echo $A$B$C -echo $A$B$C$AA' -exec_test 'echo $TEST' -exec_test 'echo "$TEST"' -exec_test "echo '$TEST'" -exec_test 'echo "$TEST$TEST$TEST"' -exec_test 'echo "$TEST$TEST=lol$TEST"' -exec_test 'echo " $TEST lol $TEST"' -exec_test 'echo $TEST$TEST$TEST' -exec_test 'echo $TEST$TEST=lol$TEST""lol' -exec_test 'echo $TEST lol $TEST' -exec_test 'echo test "" test "" test' -exec_test 'echo "$=TEST"' -exec_test 'echo "$"' -exec_test 'echo "$?TEST"' -exec_test 'echo $TEST $TEST' -exec_test 'echo "$T1TEST"' - - -printf $YELLOW"EXIT\n\n$RESET" -exec_test "exit 42" -exec_test "exit 42 53 68" -exec_test "exit 259" -exec_test "exit 9223372036854775807" -exec_test "exit -9223372036854775808" -exec_test "exit 9223372036854775808" -exec_test "exit -9223372036854775810" -exec_test "exit -4" -exec_test "exit wrong" -exec_test "exit wrong_command" -exec_test "gdagadgag" -exec_test "ls -Z" -exec_test "cd gdhahahad" -exec_test "ls -la | wtf" -exec_test "echo \"\"" -exec_test "exit" -exec_test "exit \"\"" -exec_test "exit \" \"" -exec_test "exit \" \"" -exec_test "exit \" \"" -exec_test "exit 42network" -exec_test "exit +" -exec_test "exit ++" -exec_test "exit -" -exec_test "exit ---" -exec_test "exit 0" -exec_test "exit +0" -exec_test "exit ++0" -exec_test "exit -0" -exec_test "exit --0" -exec_test "exit 1" -exec_test "exit +1" -exec_test "exit ++1" -exec_test "exit -1" -exec_test "exit --1" -exec_test "exit ' 3'" -exec_test "exit '3 '" -exec_test "exit 255" -exec_test "exit -255" -exec_test "exit 256" -exec_test "exit 2147483647" -exec_test "exit 2147483648" -exec_test "exit -2147483648" -exec_test "exit -2147483649" -exec_test "exit 4294967295" -exec_test "exit 4294967296" -exec_test "exit -4294967296" -exec_test "exit -4294967297" -exec_test "exit 9223372036854775807" -exec_test "exit 9223372036854775808" -exec_test "exit -9223372036854775808" -exec_test "exit -9223372036854775809" -exec_test "exit 18446744073709551615" -exec_test "exit 18446744073709551616" -exec_test "exit -18446744073709551616" -exec_test "exit -18446744073709551617" -exec_test "exit 9999999999999999999999" -exec_test "exit 0000000000000000000000" -exec_test "exit 0000000000000000000001" -exec_test "exit 1 2 3" -exec_test "exit 1 2 3 -echo should not exit" -exec_test "exit 1 not numeric bro" -exec_test "exit not numeric bro 2" -exec_test "exit 42 | cat" -exec_test "Exit 1 -echo is not a builtin" -exec_test "aaa -exit 1" -exec_test "touch testingfile -chmod 000 testingfile" -exec_test "cat testingfile -exit" -exec_test "cat testingfile -exit 1" -exec_test "cat src -exit" -exec_test "cat src -exit 1" -exec_test "cafkajdkf -exit" -exec_test "calfakfkakd -exit 1" -exec_test "cat Makefile -exit" -exec_test "cat Makefile -exit 1" -exec_test "cat /bin -exit" -exec_test "cat /bin -exit 1" -exec_test "chmod 777 testingfile -rm -rf testingfile" - - -printf $YELLOW"ENV EXPANSIONS\n\n$RESET" -ENV_SHOW="env | sort | grep -v SHLVL | grep -v _=" -EXPORT_SHOW="export | sort | grep -v SHLVL | grep -v _= | grep -v OLDPWD" -exec_test 'export =' -exec_test 'export 1TEST= -' $ENV_SHOW -exec_test 'export TEST -' $EXPORT_SHOW -exec_test 'export ""="" -' $ENV_SHOW -exec_test 'export TES=T="" -' $ENV_SHOW -exec_test 'export TE+S=T="" -' $ENV_SHOW -exec_test 'export TEST=LOL -echo $TEST -' $ENV_SHOW -exec_test 'export TEST=LOL -echo $TEST$TEST$TEST=lol$TEST' -exec_test 'export TEST=LOL -export TEST+=LOL -echo $TEST -' $ENV_SHOW -exec_test $ENV_SHOW -exec_test $EXPORT_SHOW -exec_test 'export TEST="ls -l - a" -echo $TEST -$LS -' $ENV_SHOW -exec_test '' - - -printf $YELLOW"PIPE\n\n$RESET" -exec_test 'cat tests/lorem.txt | grep arcu | cat -e' -exec_test 'echo test | cat -e | cat -e | cat -e | cat -e | cat -e | cat -e | cat -e | cat -e | cat -e | cat -e| cat -e| cat -e| cat -e| cat -e| cat -e| cat -e| cat -e| cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e|cat -e' -exec_test 'cat /dev/random | head -c 100 | wc -c' -exec_test 'ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|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ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls|ls' - - -printf $YELLOW"REDIRECTIONS\n\n$RESET" -exec_test 'echo test > ls -cat ls' -exec_test 'echo test > ls >> ls >> ls - echo test >> ls - cat ls' -exec_test '> lol echo test lol - cat lol' -exec_test '>lol echo > test>lol>test>>lol>test mdr >lol test >test - cat test' -exec_test 'cat < ls' -exec_test 'cat < ls > ls' - - -printf $YELLOW"SYNTAX ERROR\n\n$RESET" -exec_test '| test' -exec_test 'echo > <' -exec_test 'echo | |' -exec_test '<' - - -printf $YELLOW"EXPAND ARGUMENTS\n\n$RESET" -exec_test 'export x="1 a 2" -exit "$x"$x"$x"' -exec_test 'export x="a 2" -exit "$x"$x"$x"' -exec_test 'export x="1 b" -exit "$x"$x"$x"' -exec_test 'export x="1 2" -exit "$x"$x"$x"' -exec_test 'export x="12" -exit "$x"$x"$x"' -exec_test 'export x="12a" -exit "$x"$x"$x"' -exec_test 'export x="1" -exit "$x"$x"$x"' -exec_test 'export x="a b" -echo "$x"$x"$x" -cat "$x"$x"$x"' -exec_test 'export x="a b" -echo ""1"x"$x '' '$x$x'"$x''$x"'$$' $x$x"$x"$$ $$"$x"$x$$"$x" -cat ""1"x"$x '' '$x$x'"$x''$x"'$$' $x$x"$x"$$ $$"$x"$x$$"$x"' -exec_test 'export x=" ab " -echo "$x"$x"$x" -cat "$x"$x"$x"' -exec_test 'export x=" ab " -echo ""1"x"$x '' '$x$x'"$x''$x"'$$' $x$x"$x"$$ $$"$x"$x$$"$x" -cat ""1"x"$x '' '$x$x'"$x''$x"'$$' $x$x"$x"$$ $$"$x"$x$$"$x"' -exec_test 'export x=" a b " -echo "$x"$x"$x" -cat "$x"$x"$x"' -exec_test 'export x=" a b " -echo ""1"x"$x '' '$x$x'"$x''$x"'$$' $x$x"$x"$$ $$"$x"$x$$"$x" -cat ""1"x"$x '' '$x$x'"$x''$x"'$$' $x$x"$x"$$ $$"$x"$x$$"$x"' -exec_test 'export x=" a b" -echo "$x"$x"$x" -cat "$x"$x"$x"' -exec_test 'export x=" a b" -echo ""1"x"$x '' '$x$x'"$x''$x"'$$' $x$x"$x"$$ $$"$x"$x$$"$x" -cat ""1"x"$x '' '$x$x'"$x''$x"'$$' $x$x"$x"$$ $$"$x"$x$$"$x"' -exec_test 'export x="a b " -echo "$x"$x"$x" -cat "$x"$x"$x"' -exec_test 'export x="a b " -echo ""1"x"$x '' '$x$x'"$x''$x"'$$' $x$x"$x"$$ $$"$x"$x$$"$x" -cat ""1"x"$x '' '$x$x'"$x''$x"'$$' $x$x"$x"$$ $$"$x"$x$$"$x"' -exec_test 'export x=" ab ab a b " -echo "$x"$x"$x" -cat "$x"$x"$x"' -exec_test 'export x=" ab ab a b " -echo ""1"x"$x '' '$x$x'"$x''$x"'$$' $x$x"$x"$$ $$"$x"$x$$"$x" -cat ""1"x"$x '' '$x$x'"$x''$x"'$$' $x$x"$x"$$ $$"$x"$x$$"$x"' -exec_test 'export x="a b c" -export z=""" -echo "$z$x$z"$z$x$z"$z$x$z"$z -cat "$z$x$z"$z$x$z"$z$x$z"$z' -exec_test 'export x="a b c" -export y=""" -echo "$y"1"x"$x ''$y $y$y$y$y $y$y$y$y $y$y$y$y '$x$x'"$x''$x"'$$' $x$x"$x"$$ $y$$"$x"$x$$"$x"$y -cat "$y"1"x"$x ''$y $y$y$y$y $y$y$y$y $y$y$y$y '$x$x'"$x''$x"'$$' $x$x"$x"$$ $y$$"$x"$x$$"$x"$y' -exec_test "echo \"\" '' -cat \"\" ''" - - -printf $YELLOW"EXPAND REDIRECTIONS\n\n$RESET" -exec_test 'export x="test file" -echo "testing..." > $x' -exec_test 'export x=" test file " -echo "testing..." > $x' -exec_test 'export x=" test file" -echo "testing..." > $x' -exec_test 'export x="test file " -echo "testing..." > $x' -exec_test 'export x="testfile" -echo "testing..." > $x -rm -rf testfile' -exec_test 'export x=" testfile " -echo "testing..." > $x -rm -rf testfile' -exec_test 'export x="te" -export y="st" -export z="fi" -export zz="le" -echo "testing..." > "$x"$y"$z"$zz -rm -rf testfile' -exec_test 'export x="te" -export y="sssssst" -export z="fi" -export zz="le" -echo "testing..." > "$x"$y "$z" -rm -rf tesssssst' \ No newline at end of file