diff options
Diffstat (limited to 'shell/ash_test')
-rw-r--r-- | shell/ash_test/ash-misc/elif1.right | 4 | ||||
-rwxr-xr-x | shell/ash_test/ash-misc/elif1.tests | 6 | ||||
-rw-r--r-- | shell/ash_test/ash-misc/elif2.right | 2 | ||||
-rwxr-xr-x | shell/ash_test/ash-misc/elif2.tests | 8 |
4 files changed, 20 insertions, 0 deletions
diff --git a/shell/ash_test/ash-misc/elif1.right b/shell/ash_test/ash-misc/elif1.right new file mode 100644 index 0000000..36dc59f --- /dev/null +++ b/shell/ash_test/ash-misc/elif1.right @@ -0,0 +1,4 @@ +ELIF1 +ELIF2 +ELIF THEN +Ok:0 diff --git a/shell/ash_test/ash-misc/elif1.tests b/shell/ash_test/ash-misc/elif1.tests new file mode 100755 index 0000000..77b8a25 --- /dev/null +++ b/shell/ash_test/ash-misc/elif1.tests @@ -0,0 +1,6 @@ +if false; then + : +elif echo 'ELIF1'; echo 'ELIF2'; then + echo "ELIF THEN" +fi +echo "Ok:$?" diff --git a/shell/ash_test/ash-misc/elif2.right b/shell/ash_test/ash-misc/elif2.right new file mode 100644 index 0000000..8f2851f --- /dev/null +++ b/shell/ash_test/ash-misc/elif2.right @@ -0,0 +1,2 @@ +THEN +Ok:0 diff --git a/shell/ash_test/ash-misc/elif2.tests b/shell/ash_test/ash-misc/elif2.tests new file mode 100755 index 0000000..3e5876f --- /dev/null +++ b/shell/ash_test/ash-misc/elif2.tests @@ -0,0 +1,8 @@ +if true; then + echo "THEN" +elif echo "ELIF false"; false; then + echo "ELIF THEN" +else + echo "ELSE" +fi +echo "Ok:$?" |