aboutsummaryrefslogtreecommitdiffstats
path: root/test-cases
diff options
context:
space:
mode:
Diffstat (limited to 'test-cases')
-rw-r--r--test-cases/case0/script.sh40
-rw-r--r--test-cases/case0/stdout.txt7
2 files changed, 47 insertions, 0 deletions
diff --git a/test-cases/case0/script.sh b/test-cases/case0/script.sh
new file mode 100644
index 0000000..bcbb4e2
--- /dev/null
+++ b/test-cases/case0/script.sh
@@ -0,0 +1,40 @@
+echo begin
+
+case foo {
+ foo { echo foo }
+}
+
+set X = foobar
+echo $X
+
+case $X {
+ foo {
+ echo is foo
+ }
+ bar {
+ echo is bar
+ }
+ foo.* {
+ echo begins with foo
+ }
+}
+
+case $X {
+ .* {
+ echo wildcard
+ }
+ foo.* {
+ echo begins with foo
+ }
+}
+
+case $X {
+ .*bar {
+ echo ends with bar
+ }
+ .* {
+ echo wildcard
+ }
+}
+
+echo end \ No newline at end of file
diff --git a/test-cases/case0/stdout.txt b/test-cases/case0/stdout.txt
new file mode 100644
index 0000000..28a547a
--- /dev/null
+++ b/test-cases/case0/stdout.txt
@@ -0,0 +1,7 @@
+begin
+foo
+foobar
+begins with foo
+wildcard
+ends with bar
+end \ No newline at end of file