diff options
Diffstat (limited to 'main/augeas/0004-Shellvars-allow-wrapping-loop-condition-to-multiple-.patch')
-rw-r--r-- | main/augeas/0004-Shellvars-allow-wrapping-loop-condition-to-multiple-.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/main/augeas/0004-Shellvars-allow-wrapping-loop-condition-to-multiple-.patch b/main/augeas/0004-Shellvars-allow-wrapping-loop-condition-to-multiple-.patch new file mode 100644 index 0000000000..8583912080 --- /dev/null +++ b/main/augeas/0004-Shellvars-allow-wrapping-loop-condition-to-multiple-.patch @@ -0,0 +1,42 @@ +From 672e60257aeaf8471d7b3f0e77c48752aeeccec9 Mon Sep 17 00:00:00 2001 +From: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> +Date: Mon, 8 Dec 2014 13:16:14 +0200 +Subject: [PATCH 04/15] Shellvars: allow wrapping loop condition to multiple + lines + +--- + lenses/shellvars.aug | 2 +- + lenses/tests/test_shellvars.aug | 4 ++++ + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/lenses/shellvars.aug b/lenses/shellvars.aug +index d25e8ca..c767067 100644 +--- a/lenses/shellvars.aug ++++ b/lenses/shellvars.aug +@@ -34,7 +34,7 @@ module Shellvars = + let xchgs = Build.xchgs + let semicol = del /;?/ "" + +- let char = /[^`;() '"\t\n\\]|\\\\./ ++ let char = /[^`;() '"\t\n\\]|\\\\(.|\n)/ + let dquot = + let char = /[^"\\]|\\\\./ | Rx.cl + in "\"" . char* . "\"" (* " Emacs, relax *) +diff --git a/lenses/tests/test_shellvars.aug b/lenses/tests/test_shellvars.aug +index 864cb6c..065130a 100644 +--- a/lenses/tests/test_shellvars.aug ++++ b/lenses/tests/test_shellvars.aug +@@ -549,6 +549,10 @@ fi\n" = + { "@condition" = "-f $FILENAME" + { "type" = "[[" } } + ++ (* Allow wrapping loop condition to multiple lines *) ++ test Shellvars.lns get "for x in foo \\\nbar\\\nbaz; do y=$x; done\n" = ++ { "@for" = "x in foo \\\nbar\\\nbaz" { "y" = "$x" } } ++ + (* Local Variables: *) + (* mode: caml *) + (* End: *) +-- +2.1.0 + |