aboutsummaryrefslogtreecommitdiffstats
path: root/main/augeas/0002-Shellvars-allow-wrapping-loop-condition-to-multiple-.patch
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2014-12-08 16:37:28 +0200
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2014-12-08 16:37:33 +0200
commit491d4e86baf9fcf4c526f827a70fc8d70b4fd899 (patch)
tree5b99e070bc1c370d59128f943ee8d58ec4b565c1 /main/augeas/0002-Shellvars-allow-wrapping-loop-condition-to-multiple-.patch
parent760934f05b012d865c323a7e4aaf593e3302b008 (diff)
downloadaports-491d4e86baf9fcf4c526f827a70fc8d70b4fd899.tar.bz2
aports-491d4e86baf9fcf4c526f827a70fc8d70b4fd899.tar.xz
main/augeas: more fixes to Shellvars lense
parse e.g. main/ruby/APKBUILD
Diffstat (limited to 'main/augeas/0002-Shellvars-allow-wrapping-loop-condition-to-multiple-.patch')
-rw-r--r--main/augeas/0002-Shellvars-allow-wrapping-loop-condition-to-multiple-.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/main/augeas/0002-Shellvars-allow-wrapping-loop-condition-to-multiple-.patch b/main/augeas/0002-Shellvars-allow-wrapping-loop-condition-to-multiple-.patch
new file mode 100644
index 0000000000..29f73e6ae7
--- /dev/null
+++ b/main/augeas/0002-Shellvars-allow-wrapping-loop-condition-to-multiple-.patch
@@ -0,0 +1,42 @@
+From 742ca2f1ca69e55e2534cab92f7aad437ec987fa 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 02/10] 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 60091a9..40a527f 100644
+--- a/lenses/shellvars.aug
++++ b/lenses/shellvars.aug
+@@ -31,7 +31,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 e4fd79f..a61bb29 100644
+--- a/lenses/tests/test_shellvars.aug
++++ b/lenses/tests/test_shellvars.aug
+@@ -493,6 +493,10 @@ fi\n" =
+ { "MALLOC_PERTURB_" = "$(($RANDOM % 255 + 1))"
+ { "export" } }
+
++ (* 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: *)
+--
+1.8.3.1
+