bug-gnulib
[Top][All Lists]
Advanced

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

argp test failure on NetBSD


From: Bruno Haible
Subject: argp test failure on NetBSD
Date: Tue, 20 Mar 2007 01:45:06 +0100
User-agent: KMail/1.5.4

Hello Sergey,

The 'argp' unit test fails on NetBSD 3.0:

stdin argp.12775 differ: char 118, line 2
stdin argp.12775 differ: char 106, line 2
stdin argp.12775 differ: char 252, line 12
FAIL: test-argp-2.sh

Since this output is not very informative, I'm changing the test to make
the comparison through "diff" instead of "cmp". Then the output looks like
this:

*** argp.25901  Sat Mar 17 22:44:17 2007
--- -   Sat Mar 17 22:44:17 2007
***************
*** 1,3 ****
  Usage: test-argp [-tvO?V] [-f FILE] [-o[ARG]] [--test] [--file=FILE]
!             [--input=FILE] [--verbose] [--optional[=ARG]] [--option] [--help]
!             [--usage] [--version] ARGS...
--- 1,3 ----
  Usage: test-argp [-tvO?V] [-f FILE] [-o[ARG]] [--test] [--file=FILE]
!             [--input=FILE] [--verbose] [--option] [--optional[=ARG]] [--help]
!             [--version] [--usage] ARGS...
*** argp.25901  Sat Mar 17 22:44:17 2007
--- -   Sat Mar 17 22:44:17 2007
***************
*** 1,3 ****
  Usage: test-argp [-tvO?V] [-f FILE] [-o[ARG]] [--test] [--file=FILE]
! [--input=FILE] [--verbose] [--optional[=ARG]] [--option] [--help] [--usage]
! [--version] ARGS...
--- 1,3 ----
  Usage: test-argp [-tvO?V] [-f FILE] [-o[ARG]] [--test] [--file=FILE]
! [--input=FILE] [--verbose] [--option] [--optional[=ARG]] [--help] [--version]
! [--usage] ARGS...
*** argp.25901  Sat Mar 17 22:44:17 2007
--- -   Sat Mar 17 22:44:17 2007
***************
*** 9,25 ****
    -v, --verbose              Simple option without arguments
  
   Option Group 2
    -o, --optional[=ARG]       Option with an optional argument. ARG is one of
                               the following:
-   -O, --option               An option
  
    many                       many units
    one                        one unit
    two                        two units
  
    -?, --help                 give this help list
-       --usage                give a short usage message
    -V, --version              print program version
  
  Mandatory or optional arguments to long options are also mandatory or optional
  for any corresponding short options.
--- 9,25 ----
    -v, --verbose              Simple option without arguments
  
   Option Group 2
+   -O, --option               An option
    -o, --optional[=ARG]       Option with an optional argument. ARG is one of
                               the following:
  
    many                       many units
    one                        one unit
    two                        two units
  
    -?, --help                 give this help list
    -V, --version              print program version
+       --usage                give a short usage message
  
  Mandatory or optional arguments to long options are also mandatory or optional
  for any corresponding short options.


Note that this is with gnulib's argp implementation, not NetBSD's one.

Where does the failure come from?

Bruno


2007-03-17  Bruno Haible  <address@hidden>

        * tests/test-argp-2.sh (func_compare): Output a context diff.

--- tests/test-argp-2.sh        5 Dec 2006 22:13:48 -0000       1.2
+++ tests/test-argp-2.sh        18 Mar 2007 00:10:52 -0000
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Test suite for argp.
-# Copyright (C) 2006 Free Software Foundation, Inc.
+# Copyright (C) 2006-2007 Free Software Foundation, Inc.
 # This file is part of the GNUlib Library.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -26,7 +26,7 @@
 # If argp was compiled without base_name, it will display full program name
   sed '1{
          s,: [^ ]*/test-argp,: test-argp,
-        }' | cmp - $TMP
+        }' | diff -c $TMP -
 }  
 
 ####





reply via email to

[Prev in Thread] Current Thread [Next in Thread]