diff options
Diffstat (limited to 'shell/hush_test')
-rw-r--r-- | shell/hush_test/hush-psubst/falsetick2.right | 1 | ||||
-rwxr-xr-x | shell/hush_test/hush-psubst/falsetick2.tests | 3 | ||||
-rw-r--r-- | shell/hush_test/hush-redir/redir_backquote1.right | 11 | ||||
-rwxr-xr-x | shell/hush_test/hush-redir/redir_backquote1.tests | 19 |
4 files changed, 34 insertions, 0 deletions
diff --git a/shell/hush_test/hush-psubst/falsetick2.right b/shell/hush_test/hush-psubst/falsetick2.right new file mode 100644 index 0000000..670f560 --- /dev/null +++ b/shell/hush_test/hush-psubst/falsetick2.right @@ -0,0 +1 @@ +Two:2 v:[] diff --git a/shell/hush_test/hush-psubst/falsetick2.tests b/shell/hush_test/hush-psubst/falsetick2.tests new file mode 100755 index 0000000..cfbd1a5 --- /dev/null +++ b/shell/hush_test/hush-psubst/falsetick2.tests @@ -0,0 +1,3 @@ +v=v +v=`exit 2` `false` +echo Two:$? v:"[$v]" diff --git a/shell/hush_test/hush-redir/redir_backquote1.right b/shell/hush_test/hush-redir/redir_backquote1.right new file mode 100644 index 0000000..810cc23 --- /dev/null +++ b/shell/hush_test/hush-redir/redir_backquote1.right @@ -0,0 +1,11 @@ +hush: can't open '/cant/be/created': No such file or directory +First +One:1 v1:[] +hush: can't open '/cant/be/created': No such file or directory +Second +One:1 v2:[] +Third +Zero:0 v3:[] +Fourth +Zero:0 v4:[] +Zero:0 v5:[1] diff --git a/shell/hush_test/hush-redir/redir_backquote1.tests b/shell/hush_test/hush-redir/redir_backquote1.tests new file mode 100755 index 0000000..41bb491 --- /dev/null +++ b/shell/hush_test/hush-redir/redir_backquote1.tests @@ -0,0 +1,19 @@ +v=v +v=`echo First >&2` `` >/cant/be/created +echo One:$? v1:"[$v]" + +v=v +v=`echo Second >&2` `true` >/cant/be/created +echo One:$? v2:"[$v]" + +v=v +v=`echo Third >&2` `true` 2>/dev/null +echo Zero:$? v3:"[$v]" + +v=v +v=`echo Fourth >&2` `false` 2>/dev/null +echo Zero:$? v4:"[$v]" + +v=v +v=`echo $?` `false` 2>/dev/null +echo Zero:$? v5:"[$v]" |