|
- #!/bin/sh
-
- # Copyright (c) 2022 Jan Lehnardt <jan@apache.org>, MIT licensed
-
-
- . ../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
|