25개 이상의 토픽을 선택하실 수 없습니다.
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- #!/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
|