Enlightenment CVS committal

Author  : mej
Project : eterm
Module  : libast

Dir     : eterm/libast/test


Modified Files:
        test.c 


Log Message:
Tue Oct 26 12:05:51 2004                        Michael Jennings (mej)

Upon return from spifopt_parse()'s postparsing run, argv[] will now
contain only the non-option arguments left on the command line.
----------------------------------------------------------------------

===================================================================
RCS file: /cvsroot/enlightenment/eterm/libast/test/test.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -3 -r1.44 -r1.45
--- test.c      23 Jul 2004 21:38:39 -0000      1.44
+++ test.c      26 Oct 2004 16:06:50 -0000      1.45
@@ -21,7 +21,7 @@
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
-static const char cvs_ident[] = "$Id: test.c,v 1.44 2004/07/23 21:38:39 mej Exp $";
+static const char cvs_ident[] = "$Id: test.c,v 1.45 2004/10/26 16:06:50 mej Exp $";
 
 #if defined(HAVE_CONFIG_H) && (HAVE_CONFIG_H != 0)
 # include <config.h>
@@ -518,11 +518,11 @@
     long color = 0;
     spif_uint32_t options = 0;
     char *argv2[] = {
-        "test", "-rt", "mytheme", "--name", "This is a name", "--exec=ssh [EMAIL 
PROTECTED]",
+        "test", "some", "stuff", "-rt", "mytheme", "--name", "This is a name", 
"--exec=ssh [EMAIL PROTECTED]",
         "--scrollbar", "--buttonbar", "no", "--login=0", "-mvd", "foo:0", "--color", 
"4",
         "--foo", "blah", "-d", "eatme", NULL
     };
-    int argc2 = 18;
+    int argc2 = 20;
     spifopt_t opts2[] = {
         SPIFOPT_STR_PP('d', "display", "X display to connect to", display),
         SPIFOPT_ARGS_PP('e', "exec", "command to run", exec),
@@ -582,12 +582,19 @@
     TEST_FAIL_IF(strcmp(SPIF_CHARPTR_C(exec[1]), "[EMAIL PROTECTED]"));
     TEST_FAIL_IF(exec[2] != NULL);
     TEST_FAIL_IF(foo == NULL);
+    TEST_FAIL_IF(SPIF_PTR_ISNULL(foo[0]));
     TEST_FAIL_IF(strcmp(SPIF_CHARPTR_C(foo[0]), "blah"));
+    TEST_FAIL_IF(SPIF_PTR_ISNULL(foo[1]));
     TEST_FAIL_IF(strcmp(SPIF_CHARPTR_C(foo[1]), "-d"));
+    TEST_FAIL_IF(SPIF_PTR_ISNULL(foo[2]));
     TEST_FAIL_IF(strcmp(SPIF_CHARPTR_C(foo[2]), "eatme"));
     TEST_FAIL_IF(foo[3] != NULL);
     TEST_FAIL_IF(color != 4);
     TEST_FAIL_IF(options != 0x1e);
+    TEST_FAIL_IF(strcmp(argv2[0], "test"));
+    TEST_FAIL_IF(strcmp(argv2[1], "some"));
+    TEST_FAIL_IF(strcmp(argv2[2], "stuff"));
+    TEST_FAIL_IF(!SPIF_PTR_ISNULL(argv2[3]));
     FREE(display);
     FREE(name);
     FREE(theme);




-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to