diff options
author | Ryan Geary <rtgnj42@gmail.com> | 2020-03-17 13:41:44 -0400 |
---|---|---|
committer | Ryan Geary <rtgnj42@gmail.com> | 2020-03-17 13:43:49 -0400 |
commit | 41e060680ea153fa8f245efc53f870bbb80faf89 (patch) | |
tree | 57504935f69df1cd8ed21a4ef758bb1fece34933 /test | |
parent | dfe4c2cad0e35996136f320b675265ce223bb326 (diff) |
Handle failure to open input file
Diffstat (limited to 'test')
-rwxr-xr-x | test/e2e_test.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/e2e_test.sh b/test/e2e_test.sh index e98fa49..1f2556a 100755 --- a/test/e2e_test.sh +++ b/test/e2e_test.sh @@ -33,6 +33,17 @@ if [ $r -ne 2 ]; then exit 1 fi +file=/tmp/000_file +touch $file +chmod 000 $file +cargo run -- 3 -i $file >&/dev/null +r=$? +if [ $r -ne 3 ]; then + echo "Failed to return 3 on file open error" + exit 1 +fi +rm -f $file + cd $orig_dir printf "\033[1;32mAll tests passed\033[0m\n" |