diff options
Diffstat (limited to 'bin/sh/tests/parser/case2.0')
-rw-r--r-- | bin/sh/tests/parser/case2.0 | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/bin/sh/tests/parser/case2.0 b/bin/sh/tests/parser/case2.0 new file mode 100644 index 0000000..14610e4 --- /dev/null +++ b/bin/sh/tests/parser/case2.0 @@ -0,0 +1,32 @@ +# $FreeBSD$ + +# Pretty much only ash derivatives can parse all of this. + +f1() { + x=$(case x in + (x|esac) ;; + (*) echo bad >&2 ;; + esac) +} +f1 +f2() { + x=$(case x in + (x|esac) ;; + (*) echo bad >&2 + esac) +} +f2 +f3() { + x=$(case x in + x|esac) ;; + *) echo bad >&2 ;; + esac) +} +f3 +f4() { + x=$(case x in + x|esac) ;; + *) echo bad >&2 + esac) +} +f4 |