| @@ -19,8 +19,8 @@ | |||||
| # echo | # echo | ||||
| . ./wait_for_pid_exit.sh | |||||
| echo test5 | |||||
| (wait_for_pid_exit 45591 4 17) | |||||
| echo "test5 done" | |||||
| # . ./wait_for_pid_exit.sh | |||||
| # | |||||
| # echo test5 | |||||
| # (wait_for_pid_exit 45591 4 17) | |||||
| # echo "test5 done" | |||||
| @@ -0,0 +1,32 @@ | |||||
| #!/bin/sh | |||||
| . ../lib.sh | |||||
| echo "testing assert_arg" | |||||
| global_error=0 | |||||
| expect=1 | |||||
| result=`assert_arg` | |||||
| if [ $? -ne $expect ]; then | |||||
| echo "assert_arg with no parameter fails" | |||||
| global_error=1 | |||||
| fi | |||||
| echo . | |||||
| expect=0 | |||||
| result=`assert_arg foo` | |||||
| if [ $? -ne $expect ]; then | |||||
| echo "assert_arg with parameter does not pass" | |||||
| global_error=1 | |||||
| echo . | |||||
| fi | |||||
| echo . | |||||
| if [ $global_error -ne 0 ]; then | |||||
| echo "one or more tests failed" | |||||
| exit 1 | |||||
| else | |||||
| echo "all tests pass" | |||||
| exit 0 | |||||
| fi | |||||