summaryrefslogtreecommitdiff
path: root/t/chainlint/case.expect
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2018-08-02 15:30:46 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-08-02 15:30:46 -0700
commitcfec6133cfcd97a23ca29c7d0ad8d2961796dd52 (patch)
tree7bdee58508f7e17c33add21d8f436687206d7446 /t/chainlint/case.expect
parentMerge branch 'jt/tags-to-promised-blobs-fix' (diff)
parentt/chainlint.sed: drop extra spaces from regex character class (diff)
downloadtgif-cfec6133cfcd97a23ca29c7d0ad8d2961796dd52.tar.xz
Merge branch 'es/chain-lint-in-subshell'
Look for broken "&&" chains that are hidden in subshell, many of which have been found and corrected. * es/chain-lint-in-subshell: t/chainlint.sed: drop extra spaces from regex character class t/chainlint: add chainlint "specialized" test cases t/chainlint: add chainlint "complex" test cases t/chainlint: add chainlint "cuddled" test cases t/chainlint: add chainlint "loop" and "conditional" test cases t/chainlint: add chainlint "nested subshell" test cases t/chainlint: add chainlint "one-liner" test cases t/chainlint: add chainlint "whitespace" test cases t/chainlint: add chainlint "basic" test cases t/Makefile: add machinery to check correctness of chainlint.sed t/test-lib: teach --chain-lint to detect broken &&-chains in subshells
Diffstat (limited to 't/chainlint/case.expect')
-rw-r--r--t/chainlint/case.expect19
1 files changed, 19 insertions, 0 deletions
diff --git a/t/chainlint/case.expect b/t/chainlint/case.expect
new file mode 100644
index 0000000000..41f121fbbf
--- /dev/null
+++ b/t/chainlint/case.expect
@@ -0,0 +1,19 @@
+(
+ case "$x" in
+ x) foo ;;
+ *) bar ;;
+ esac &&
+ foobar
+>) &&
+(
+ case "$x" in
+ x) foo ;;
+ *) bar ;;
+?!AMP?! esac
+ foobar
+>) &&
+(
+ case "$x" in 1) true;; esac &&
+?!AMP?! case "$y" in 2) false;; esac
+ foobar
+>)