Commit Graph

290 Commits

Author SHA1 Message Date
Jim Meyering
2232b4d08f maint: update all Copyright year lists to include 2009 2009-06-23 22:33:15 +02:00
Jim Meyering
a4053c5291 pr: fix a bug whereby --indent=N (-o) did not indent header lines
* src/pr.c (print_header): Honor chars_per_margin also for the header.
Inspired by a patch from C de-Avillez.
This change also adjusts two other %*s directives to be %*.*s instead,
(for the padding on either side of "file_text") to correct a bug that
could make pr print one space of padding instead of none.
* NEWS (Bug fixes): Mention it.
* tests/pr/o3Jml24f-lm-lo: Adjust for new expected output.
* tests/pr/o3a3Sl24f-tn: Likewise.
* tests/pr/o3a3Snl24f-tn: Likewise.
* tests/pr/o3a3l24f-tn: Likewise.
* tests/pr/o3b3Sl24f-tn: Likewise.
* tests/pr/o3b3Snl24f-tn: Likewise.
* tests/pr/o3b3l24f-tn: Likewise.
* tests/pr/o3mSl24f-bl-tn: Likewise.
* tests/pr/o3mSnl24fbltn: Likewise.
* tests/pr/o3ml24f-bl-tn: Likewise.
2009-03-07 23:52:08 +01:00
Jim Meyering
c6c9e8730e prefer abs_srcdir over abs_top_srcdir, ...
so that e.g., tests/* may refer to absolute names without
hard-coding the name of the containing directory (tests/, here).
* tests/check.mk (TESTS_ENVIRONMENT): Define abs_srcdir.
* tests/pr/pr-tests: Use $abs_srcdir/pr not $abs_top_srcdir/tests/pr.
* tests/chmod/c-option: Use $abs_srcdir, not $abs_top_srcdir/tests.
* tests/cp/cp-parents: Likewise.
* tests/mkdir/parents: Likewise.
* tests/mkdir/perm: Likewise.
* tests/mv/acl: Likewise.
* tests/mv/backup-is-src: Likewise.
* tests/mv/hard-link-1: Likewise.
* tests/mv/into-self-2: Likewise.
* tests/mv/leak-fd: Likewise.
* tests/mv/mv-special-1: Likewise.
* tests/mv/part-fail: Likewise.
* tests/mv/part-hardlink: Likewise.
* tests/mv/part-rename: Likewise.
* tests/mv/part-symlink: Likewise.
* tests/mv/partition-perm: Likewise.
* tests/mv/sticky-to-xpart: Likewise.
* tests/mv/to-symlink: Likewise.
* tests/rm/one-file-system: Likewise.
* tests/sample-test: Likewise.
2008-05-27 13:30:44 +02:00
Jim Meyering
1081bbc74e tests: remove ugly /bin/sh wrapper around each perl-based test script
* tests/check.mk (TESTS_ENVIRONMENT): Save and restore TMPDIR around
envvar-check, so that the few scripts that require $TMPDIR don't fail.
This is also good to let a user's default TMPDIR setting be used e.g.,
in the search for an 'other-partition'.
FIXME: this is pretty ugly.  maybe undo it and find a better way.
(TESTS_ENVIRONMENT): Invoke perl scripts with $(PERL), and use -T
if the script requires that.  Otherwise, use $(SHELL).

* tests/misc/md5sum-newline: Create a file whose name contains
a newline in Perl (resort to using "system", since open refuses).

Fix old brokenness exposed by this change:
* tests/du/files0-from: Correct test not to rely on stdin
being attached to a non-tty.
* tests/misc/sort (3g, 3h, 3i): Likewise: add explicit empty input file.
Avoid warnings about using qw()-around-commas.

* tests/rm/fail-eperm: Now that this test is run from a temporary
subdirectory, adjust the full name of the "rm" program we're going
to run.

Change #!/bin/sh to #!/usr/bin/perl, and factor out the few lines
of boilerplate code to invoke perl.  Do not "require 5.00x";
a configure-time Perl test handles that
* tests/dd/skip-seek:
* tests/misc/base64:
* tests/misc/basename:
* tests/misc/cut:
* tests/misc/date:
* tests/misc/dircolors:
* tests/misc/dirname:
* tests/misc/expand:
* tests/misc/expr:
* tests/misc/factor:
* tests/misc/fmt:
* tests/misc/fold:
* tests/misc/head:
* tests/misc/head-elide-tail:
* tests/misc/join:
* tests/misc/ls-misc:
* tests/misc/md5sum:
* tests/misc/md5sum-newline:
* tests/misc/mktemp:
* tests/misc/od:
* tests/misc/paste:
* tests/misc/pr:
* tests/misc/printf-cov:
* tests/misc/seq:
* tests/misc/sha1sum:
* tests/misc/sha1sum-vec:
* tests/misc/sha224sum:
* tests/misc/sha256sum:
* tests/misc/sha384sum:
* tests/misc/sha512sum:
* tests/misc/sort-merge:
* tests/misc/stat-printf:
* tests/misc/sum:
* tests/misc/tac:
* tests/misc/tail:
* tests/misc/test:
* tests/misc/test-diag:
* tests/misc/tr:
* tests/misc/tsort:
* tests/misc/tty-eof:
* tests/misc/unexpand:
* tests/misc/uniq:
* tests/misc/wc:
* tests/misc/wc-files0-from:
* tests/misc/xstrtol:
* tests/mv/i-1:
* tests/pr/pr-tests:
* tests/rm/empty-name:
* tests/rm/fail-eperm:
* tests/rm/unreadable:
2008-05-17 08:27:58 +02:00
Jim Meyering
a59258fbc7 tests: convert pr tests
* configure.ac (AC_CONFIG_FILES): Remove tests/pr/Makefile.
* tests/Makefile.am (SUBDIRS): Remove pr.
* tests/pr/pr-tests: New file, with tests from...
* tests/pr/Test.pm: ...here.  Remove file.
* tests/Makefile.am (EXTRA_DIST): Add $(pr_data).
(pr_data): List all of the pr's test-related data files.
2008-05-10 13:35:29 +02:00
Jim Meyering
6856089f7b pr -e, with a mix of backspaces and TABs, could corrupt the heap
* tests/pr/Test.pm: New tests for the above.
* src/pr.c (char_to_clump): Ensure that "input_position" never
goes below 0.
Also, elide any backspace encountered when input_position is 0,
to be compatible at least with /bin/pr from Solaris 10.
This bug is present in the original version:
b25038ce9a
* NEWS [Bug fixes]: Mention this.
Report and diagnosis by Cristian Cadar, Daniel Dunbar and Dawson Engler
in http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13272
2008-04-19 13:34:38 +02:00
Jim Meyering
6e3e819f4b Remove all .cvsignore files from version control. 2007-08-25 00:27:11 +02:00
Jim Meyering
71aa3ea880 Update all copyright notices to use the newer form. 2007-07-23 14:35:58 +02:00
Jim Meyering
33342c1a0a Change "version 2" to "version 3" in all copyright notices. 2007-07-10 13:35:56 +02:00
Paul Eggert
36ce675bb4 pr -F no longer suppresses the footer or the first two blank header lines
Here's a patch along the lines of
<http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/10849/focus=10857>.
It's a bit large since it changes the test cases to match the behavior,
and the test cases' file names depend on the behavior!

* NEWS: pr -F no longer suppresses the footer or the first two blank
lines in the header.
* doc/coreutils.texi (pr invocation): Likewise.  Also, a too-short
page length implies -t, not -T.
* src/pr.c (lines_per_header, lines_per_footer): Now constants.
(init_parameters): Don't try to change them.
(print_header): Use the same header and footer format regardless of
wither form feeds are being used.
(usage): Adjust to above change when describing too-short page length.
Too-short page length impliesy -t, not -T.
* tests/pr/2-S_f-t_notab: Adjust to the fact that -F now affects
only formfeed handling; it does not change the header.
* tests/pr/2-Sf-t_notab: Likewise.
...
* tests/pr/3-5l17f-t: Remove, since it's been renamed to another
file whose name has a line count 7 larger,
reflecting the new line count needed for this behavior.
* tests/pr/3a3l8f-t: Likewise.
...
* tests/pr/w72l24f-ll: Likewise.

Signed-off-by: Jim Meyering <jim@meyering.net>
2007-07-04 12:45:10 +02:00
Jim Meyering
893ac688cc Remove the generated tests/*/Makefile.am files from version control.
* tests/cut/Makefile.am: git-remove this generated file.
* tests/head/Makefile.am: Likewise.
* tests/join/Makefile.am: Likewise.
* tests/pr/Makefile.am: Likewise.
* tests/sort/Makefile.am: Likewise.
* tests/tac/Makefile.am: Likewise.
* tests/tail/Makefile.am: Likewise.
* tests/test/Makefile.am: Likewise.
* tests/tr/Makefile.am: Likewise.
* tests/uniq/Makefile.am: Likewise.
* tests/wc/Makefile.am: Likewise.
* .cvsignore, .gitignore: Ignore these generated files.

* src/.cvsignore, src/.gitignore: Add chcon here, ...
* .cvsignore, .gitignore: ... not here.
2007-05-13 18:23:41 +02:00
Jim Meyering
9c88531fb0 Put CU_TEST_NAME in the environment for each test run by "make check".
* Transform all Makefile.am files so that when running "make check",
CU_TEST_NAME is set to the name of the test.  This is so that when I
run valgrind-enabled (--log-file-qualifier=CU_TEST_NAME) "make check"
on the entire package it is more convenient to map a leak or error
found in a valgrind log file back to the offending test.
Use this command:
(echo tests/Makefile.am.in; find tests -name Makefile.am) \
 |xargs perl -pi -e '/^(\s*)PATH=...VG_PATH_PREFIX/ and ' \
   -e 'print $1,q|CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst |,"\\\n"'
2007-01-13 11:32:19 +01:00
Paul Eggert
6d124bf98a * aclocal.m4, config.hin, configure:
Remove from CVS, since ./bootstrap generates them automatically.
* .cvsignore: Add INSTALL, Makefile.in, *.cache, *.lineno, *.log.
Remove more-specific entries.  This catches files like configure.lineno.
* man/.cvsignore: Add Makefile.in.
* src/.cvsignore: Add Makefile.in.
Remove .version, dir.c, install, mvdir, stamp-v, vdir.c, version.c.

For .cvsignore file under the tests directory:
Add Makefile.in.  Sort entries if necessary.  Remove *.I, *.E,
*.X, *.O, *-tests, build-script, mk-script if they're never
created in this directory.

* build-aux/.cvsignore: New file.
* doc/.cvsignore: Add Makefile.in, coreutils.html, coreutils.pdf,
coreutils.ps, coreutils.tps.  Remove coreutils.cm (dunno what it
is, but the makefile doesn't mention it).  Remove coreutils.info
as it is subsumed by coreutils.info*.
* lib/.cvsignore: Add Makefile.in, getdate.tab.h.
Remove stat.c, sysexit.h.
* m4/.cvsignore: Remove Makefile, dev-ino.m4, glibc2.m4, intdiv0.m4,
inttypes-h.m4, inttypes-pri.m4, jm-glibc-io.m4, lcmessage.m4,
lock.m4, printf-posix.m4, same-inode.m4, size_max.m4,
uintmax_t.m4, ulonglong.m4, visibility.m4, xsize.m4.  Many of
these are put in automatically by ../bootstrap, but that's a
bootstrap bug that I plan to fix shortly.
* po/.cvsignore: More ../bootstrap-related fixes, plus remove old
cruft.  Add *.po, LINGUAS, Makevars.  Remove *.cat, *.msg,
cat-id-dbl.c, messages.mo, stamp-cat-id.
2006-08-22 18:50:24 +00:00
Paul Eggert
0f7a044109 Remove from CVS, since the bootstrap script generates them automatically. 2006-08-21 07:26:38 +00:00
Jim Meyering
03ffc923e9 . 2006-08-19 19:34:16 +00:00
Jim Meyering
9b3bb934bc Some of my 2006-07-03 changes to tests/*/Makefile.am were being
backed out due to updates provoked by the copyright changes.
* tests/Makefile.am.in (PATH): Prepend $(VG_PATH_PREFIX), so that
it propagates to the derived Makefile.am files.
($(srcdir)/Makefile.am): Mark generated .am files as read-only,
so we don't mistakenly edit them again.
* tests/cut/Makefile.am: Regenerate.
* tests/head/Makefile.am: Likewise.
* tests/join/Makefile.am: Likewise.
* tests/pr/Makefile.am: Likewise.
* tests/sort/Makefile.am: Likewise.
* tests/tac/Makefile.am: Likewise.
* tests/tail/Makefile.am: Likewise.
* tests/test/Makefile.am: Likewise.
* tests/tr/Makefile.am: Likewise.
* tests/uniq/Makefile.am: Likewise.
* tests/wc/Makefile.am: Likewise.
2006-08-19 16:02:11 +00:00
Paul Eggert
218fa5c61b Add/fix copyright notices and adjust to latest GNU FDL. 2006-08-17 19:58:17 +00:00
Jim Meyering
e5b0d0aa85 . 2006-08-15 12:05:34 +00:00
Paul Eggert
ade68b234a Regenerate. 2006-08-09 23:46:10 +00:00
Paul Eggert
acaeed035b Regenerate. 2006-08-09 20:24:38 +00:00
Paul Eggert
a58ac00556 Regenerate. 2006-07-17 03:52:18 +00:00
Paul Eggert
914c8674a5 Regenerate. 2006-07-09 17:20:26 +00:00
Jim Meyering
ae87c86b4a * tests/Makefile.am, tests/*/Makefile.am: (TESTS_ENVIRONMENT):
Add $VG_PATH_PREFIX as a prefix to $PATH
2006-07-03 12:55:25 +00:00
Jim Meyering
9980147451 . 2006-05-06 15:52:56 +00:00
Jim Meyering
a35fc49153 . 2006-03-26 12:33:28 +00:00
Jim Meyering
de33c6c49d . 2006-03-12 22:47:35 +00:00
Jim Meyering
3f7e0c2173 . 2006-02-20 13:00:54 +00:00
Jim Meyering
7dabfc7e73 . 2006-01-12 08:40:34 +00:00
Jim Meyering
084903a2b1 . 2006-01-04 21:06:39 +00:00
Jim Meyering
1e1938032b . 2005-12-21 10:23:51 +00:00
Jim Meyering
c99e1d2cb6 . 2005-12-17 10:48:30 +00:00
Jim Meyering
049a807bc6 . 2005-12-15 14:47:36 +00:00
Jim Meyering
b3e300393e . 2005-12-03 23:19:58 +00:00
Jim Meyering
66878248f6 . 2005-11-22 15:33:39 +00:00
Jim Meyering
708c4e6682 . 2005-10-23 16:00:59 +00:00
Jim Meyering
a40376f4c5 . 2005-09-23 20:14:20 +00:00
Jim Meyering
fc6f1f7f9c . 2005-09-22 09:47:36 +00:00
Paul Eggert
9bbbf30543 Regenerate. 2005-09-22 07:07:36 +00:00
Paul Eggert
96971b59be Regenerate. 2005-09-16 07:58:03 +00:00
Jim Meyering
aadcf5b2e4 . 2005-09-10 14:16:53 +00:00
Paul Eggert
97f9677790 Regenerate. 2005-09-09 21:21:16 +00:00
Jim Meyering
bbd6e2ef20 . 2005-09-04 20:08:25 +00:00
Jim Meyering
0508157932 . 2005-08-02 21:15:19 +00:00
Jim Meyering
95550da8d3 . 2005-07-12 16:44:52 +00:00
Paul Eggert
060594db56 Regenerate. 2005-07-08 00:35:04 +00:00
Jim Meyering
52c7a92b85 . 2005-07-07 17:59:05 +00:00
Jim Meyering
85ddb64559 . 2005-07-03 11:58:11 +00:00
Paul Eggert
de0cf8356f Regenerate. 2005-07-03 07:28:38 +00:00
Jim Meyering
42f845ebc7 . 2005-07-02 14:33:56 +00:00
Jim Meyering
c44874f722 . 2005-06-30 20:32:46 +00:00