]> git.ipfire.org Git - thirdparty/bash.git/blobdiff - tests/trap2.sub
bash-5.0 distribution sources and documentation
[thirdparty/bash.git] / tests / trap2.sub
index 73357df2a25dfd8c11adab8a78abadc2ac668ffd..0f1f2d96288bd895ebb3fbebfa794de26ac1210c 100755 (executable)
@@ -23,3 +23,27 @@ echo after while
 ./trap2a.sub
 
 echo $(false ; echo command substitution)
+
+# test behavior of failed commands following `command' builtin
+command false
+
+(command false)
+command false | echo bar
+
+(false)
+
+exit 42 | command false
+
+command command command false
+
+unset FALSE
+if [ -x /bin/false ]; then
+        FALSE=/bin/false
+elif [ -x /usr/bin/false ]; then
+        FALSE=/usr/bin/false
+else
+        FALSE='command false'
+fi
+
+command $FALSE
+command command command $FALSE