From 4fc02ef33ddea3411b420d6ab9b99088b21974d9 Mon Sep 17 00:00:00 2001 From: Ryuichi Ueda Date: Sat, 20 Jul 2024 12:33:33 +0900 Subject: [PATCH] Add test cases --- Cargo.toml | 2 +- test/test.bash | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index f25300ac..18cacb42 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sush" -version = "0.5.4" +version = "0.5.5" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/test/test.bash b/test/test.bash index 9e757490..8df4c2c0 100755 --- a/test/test.bash +++ b/test/test.bash @@ -1353,6 +1353,12 @@ res=$($com <<< 'set -e ; false || false ; echo NG') res=$($com <<< 'set -e ; while false ; do echo NG ; done ; echo OK') [ "$res" == "OK" ] || err $LINENO +res=$($com <<< 'set -o pipefail; ls aaaa | false | true') +[ "$?" == "1" ] || err $LINENO + +res=$($com <<< 'set -o pipefail; set -e; false | true ; echo NG') +[ "$res" == "" ] || err $LINENO + ### JOB TEST ### res=$($com <<< 'sleep 1 & sleep 2 & sleep 3 & jobs')