From 5c20fa70870fb08ddee1d4dde3cbe89485b5df7d Mon Sep 17 00:00:00 2001
From: Martin Nilsson <mani@lysator.liu.se>
Date: Thu, 1 May 2008 23:08:15 +0200
Subject: [PATCH] Some Arg tests.

Rev: lib/modules/testsuite.in:1.40
---
 lib/modules/testsuite.in | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/lib/modules/testsuite.in b/lib/modules/testsuite.in
index e461ca8ea7..a6964850c3 100644
--- a/lib/modules/testsuite.in
+++ b/lib/modules/testsuite.in
@@ -1,7 +1,21 @@
-dnl $Id: testsuite.in,v 1.39 2007/12/27 00:51:47 nilsson Exp $
+dnl $Id: testsuite.in,v 1.40 2008/05/01 21:08:15 nilsson Exp $
 
 START_MARKER
 
+dnl - Arg
+
+test_equal( Arg.parse("aa --hopp --haha=ho -bar=foo x y"/" "),
+ ([ "hopp":1, "haha":"ho", "b":1, "a":1, "r":"foo", Arg.REST: ({"x","y"}) ]) )
+test_equal( Arg.parse("aa -bar -x=6"/" "),
+ ([ "b":1, "a":1, "r":1, "x":"6", Arg.REST: ({}) ]) )
+test_equal( Arg.parse("aa --foo --bar"/" "),
+ ([ "foo":1, "bar":1, Arg.REST: ({}) ]) )
+test_equal( Arg.parse("aa --foo - --bar"/" "),
+ ([ "foo":1, Arg.REST: ({ "-","--bar" }) ]) )
+test_equal( Arg.parse("aa --foo x --bar"/" "),
+ ([ "foo":1, Arg.REST: ({ "x","--bar" }) ]) )
+
+
 dnl - Array
 
 test_equal(Array.diff(({ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }),
-- 
GitLab