[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[augeas-devel] augeas: master - Lokkit: allow '-' in arguments



Gitweb:        http://git.fedorahosted.org/git/augeas.git?p=augeas.git;a=commitdiff;h=15ba82cb8731ddbd1d9acd0ac9e769b68ae3a682
Commit:        15ba82cb8731ddbd1d9acd0ac9e769b68ae3a682
Parent:        61a64f8a3629cffb90b94b5b801797b2a4dac8af
Author:        David Lutterkort <lutter redhat com>
AuthorDate:    Thu Dec 17 10:11:40 2009 -0800
Committer:     David Lutterkort <lutter redhat com>
CommitterDate: Thu Dec 17 10:11:40 2009 -0800

Lokkit: allow '-' in arguments

---
 lenses/lokkit.aug            |    2 +-
 lenses/tests/test_lokkit.aug |    4 ++++
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/lenses/lokkit.aug b/lenses/lokkit.aug
index d68db5f..830f956 100644
--- a/lenses/lokkit.aug
+++ b/lenses/lokkit.aug
@@ -12,7 +12,7 @@ let spc = Util.del_ws_spc
 let dels = Util.del_str
 
 let eq = del /[ \t=]+/ "="
-let token = store /[a-zA-Z0-9]+/
+let token = store /[a-zA-Z0-9][a-zA-Z0-9-]*/
 
 let long_opt (n:regexp) =
   [ dels "--" . key n . eq . token . eol ]
diff --git a/lenses/tests/test_lokkit.aug b/lenses/tests/test_lokkit.aug
index 8302d9c..c197687 100644
--- a/lenses/tests/test_lokkit.aug
+++ b/lenses/tests/test_lokkit.aug
@@ -82,3 +82,7 @@ test Lokkit.lns get
   { "trust" = "tun+" }
   { "trust" = "eth0.42" }
   { "trust" = "eth0:1" }
+
+(* We didn't allow '-' in the service name *)
+test Lokkit.lns get "--service=samba-client\n" =
+  { "service" = "samba-client" }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]