maint: update copyright
[gnulib.git] / tests / test-argmatch.c
index 3d6f968..735cb76 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of exact or abbreviated match search.
-   Copyright (C) 1990, 1998-1999, 2001-2007 Free Software Foundation, Inc.
+   Copyright (C) 1990, 1998-1999, 2001-2014 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 #include "argmatch.h"
 
-#include <stdio.h>
 #include <stdlib.h>
 
 #include "progname.h"
+#include "macros.h"
 
-#define ASSERT(expr) \
-  do                                                                        \
-    {                                                                       \
-      if (!(expr))                                                          \
-        {                                                                   \
-          fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
-          abort ();                                                         \
-        }                                                                   \
-    }                                                                       \
-  while (0)
+/* Some packages define ARGMATCH_DIE and ARGMATCH_DIE_DECL in <config.h>, and
+   thus must link with a definition of that function.  Provide it here.  */
+#ifdef ARGMATCH_DIE_DECL
+
+_Noreturn ARGMATCH_DIE_DECL;
+ARGMATCH_DIE_DECL { exit (1); }
+
+#endif
 
 enum backup_type
 {
@@ -62,11 +60,6 @@ static const enum backup_type backup_vals[] =
   numbered_backups, numbered_backups, numbered_backups
 };
 
-void
-usage (void)
-{
-}
-
 int
 main (int argc, char *argv[])
 {