summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2007-01-11 18:59:24 +0100
committerJim Meyering <jim@meyering.net>2007-01-11 18:59:24 +0100
commitc6357f0cabfa46535285d5401cdf28d5d4469670 (patch)
treeee27bd84bd5fd615fe6452371df4aa43da5126f7
parentfbcbba4b946683ba663df78d9e15c052f7244795 (diff)
downloadcoreutils-c6357f0cabfa46535285d5401cdf28d5d4469670.tar.xz
* tests/misc/test-diag: Work also when libc's error function
reports the entire program name ("../../src/test"), rather than just the final component.
-rw-r--r--ChangeLog6
-rwxr-xr-xtests/misc/test-diag6
2 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 413a234f4..6e4e9be31 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-01-11 Jim Meyering <jim@meyering.net>
+
+ * tests/misc/test-diag: Work also when libc's error function
+ reports the entire program name ("../../src/test"), rather than
+ just the final component.
+
2007-01-10 Jim Meyering <jim@meyering.net>
Don't use fts_statp uninitialized for "chown -RLh --preserve-root ...".
diff --git a/tests/misc/test-diag b/tests/misc/test-diag
index 87fe7573c..d2a40fa23 100755
--- a/tests/misc/test-diag
+++ b/tests/misc/test-diag
@@ -1,7 +1,7 @@
#!/bin/sh
# Test the diagnostics of "test".
-# Copyright (C) 2006 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2007 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
@@ -40,7 +40,9 @@ my $prog = '../../src/test';
my @Tests =
(
# In coreutils-5.93, this diagnostic lacked the newline.
- ['o', '-o arg', {ERR => "$prog: extra argument `-o'\n"}, {EXIT => 2}],
+ ['o', '-o arg', {ERR => "test: extra argument `-o'\n"},
+ {ERR_SUBST => 's!^$prog:!test:!'},
+ {EXIT => 2}],
);
my $save_temps = $ENV{DEBUG};