summaryrefslogtreecommitdiff
path: root/tests/Coreutils.pm
AgeCommit message (Collapse)Author
2012-09-05build: don't use recursive make for tests/ subdirectoryStefano Lattarini
* Makefile.am (SUBDIRS): Remove 'tests'. (include): The '$(top_srcdir)/tests/local.mk' file. (check-root): Remove this convenience target, it's no longer needed now that the "real" check-root target once in 'tests/Makefile' will land in the top-level makefile. * configure.ac (AC_CONFIG_FILES): Remove 'tests/Makefile'. * tests/Makefile.am: Rename ... * tests/local.mk: ... like this, with a lot of adjustments. * tests/init.cfg: Move ... * init.cfg: ... here. This is necessary, for a limitation of the gnulib-provided 'tests/init.sh', which unconditionally look for 'init.cfg' in the $(srcdir) directory. * tests/*/*.sh: Adjust: expect init.sh to be in '$srcdir/tests', not in '$srcdir', and extend $PATH with './src', not with '../src'. * tests/Coreutils.pm: Adjust similarly. * tests/pr/pr-tests.pl ($pfx): Likewise.
2012-08-16tests: reverse args in Coreutils.pm-invoked diff, for consistencyJim Meyering
* tests/Coreutils.pm (_compare_files): Reverse diff arguments so that we invoke diff -c $expected $actual, which is consistent with how init.sh-using tests invoke "compare exp out".
2012-01-27maint: use single copyright year rangeJim Meyering
Run "make update-copyright".
2012-01-09tests: more automated quote adjustmentJim Meyering
Relax initial regexp to match more instances, but add a filter to avoid some invalid conversions. Run this: git grep -l "\`[^']*'" tests | xargs perl -pi -e '$q=q"'\''";' \ -e '$q="$q\\$q$q"; /(= ?\`|\`expr|\`echo|\Q$q\E)/ and next;' \ -e ' s/\`([^'\''"]*?'\'')/'\''$1/g' The last disjunct in the above (...) filter is to exempt any line that contains this string: '\'' With quoting like that, converting a ` to ' is likely to cause trouble, so we'll handle those manually. Here are three examples where the exemption is required: *': `link-to-dir/'\'': hard link not allowed for directory'*) ;; printf 'creating file `%s'\''\n' $f 'mv: inter-device move failed: `%s'\'' to `%s'\'';'\
2012-01-09tests: change `...' to '...' on lines not matching /[=\$]/Jim Meyering
Exempt lines with '$' or '=', since those are prone to improper conversion. Run this: git grep -l "\`[^']*'" tests \ |xargs perl -pi -e '/[=\$]/ and next;s/\`([^'\''"]*?'\'')/'\''$1/g'
2012-01-01maint: update all copyright year number rangesJim Meyering
Run "make update-copyright".
2011-01-01maint: update all copyright year number rangesJim Meyering
Run "make update-copyright".
2010-12-28coreutils: keep lines within 80-column limitsPaul Eggert
* cfg.mk (LINE_LEN_MAX, FILTER_LONG_LINES): New macros. (sc_long_lines): New rule. * HACKING: Use shorter URLs to the same material. * doc/Makefile.am, doc/coreutils.texi, m4/boottime.m4: * man/help2man, man/stdbuf.x, src/Makefile.am, src/cat.c, src/copy.c: * src/cp.c, src/dd.c, src/df.c, src/du.c, src/groups.c, src/install.c: * src/ls.c, src/md5sum.c, src/mv.c, src/od.c, src/pinky.c, src/ptx.c: * src/readlink.c, src/remove.c, src/rmdir.c, src/setuidgid.c: * src/sort.c, src/tail.c, src/touch.c, tests/Coreutils.pm: * tests/cp/existing-perm-race, tests/cp/perm, tests/cp/preserve-gid: * tests/du/2g, tests/du/long-from-unreadable, tests/init.sh: * tests/install/basic-1, tests/ls/nameless-uid: * tests/ls/readdir-mountpoint-inode, tests/misc/chroot-credentials: * tests/misc/cut, tests/misc/date, tests/misc/join, tests/misc/md5sum: * tests/misc/sha1sum, tests/misc/sha224sum, tests/misc/sort: * tests/misc/sort-continue, tests/misc/sort-files0-from: * tests/misc/sort-rand, tests/misc/stdbuf, tests/misc/tr: * tests/misc/uniq, tests/mv/atomic, tests/mv/part-fail: * tests/mv/part-symlink, tests/mv/sticky-to-xpart, tests/pr/pr-tests: * tests/rm/fail-2eperm, tests/rm/interactive-always: Reformat to fit within 80 columns. * doc/Makefile.am (BAD_POSIX_PERL): New macro. * doc/coreutils.texi: Reword slightly, to make menus and index lines shorter. * src/md5sum.c: Redo --help output so that it fits within 79 columns, since that's a bit more portable and all the other --help strings fit in 79 columns.
2010-01-01maint: update all FSF copyright year lists to include 2010Jim Meyering
Use this command: git ls-files | grep -v COPYING \ | xargs env UPDATE_COPYRIGHT_USE_INTERVALS=1 \ build-aux/update-copyright
2009-08-25global: convert indentation-TABs to spacesJim Meyering
Transformed via this shell code: t=$'\t' git ls-files \ | grep -vE '(^|/)((GNU)?[Mm]akefile|ChangeLog)|\.(am|mk)$' \ | grep -vE 'tests/pr/|help2man' \ | xargs grep -lE "^ *$t" \ | xargs perl -MText::Tabs -ni -le \ '$m=/^( *\t[ \t]*)(.*)/; print $m ? expand($1) . $2 : $_'
2009-06-23maint: update all Copyright year lists to include 2009Jim Meyering
2009-01-03tests: refactor to use the new getlimits utilityPádraig Brady
* tests/Coreutils.pm: Add function to make limits available * tests/test-lib.sh: ditto * tests/misc/join: Check for both SIZE_OFLOW and UINTMAX_OFLOW rather than using arbitrary 2^128 * tests/misc/sort: ditto * tests/misc/uniq: ditto * tests/misc/printf: Check for both INT_OFLOW and INT_UFLOW rather than using arbitrary -2^31 * tests/misc/seq-long-double: Check for INTMAX_OFLOW rather than using arbitrary 2^63 * tests/misc/split-fail: Check --lines --bytes and --line-bytes options limits on all platforms. Note getlimits obviates the need to use expr to check if 32 bit integers are supported, which I think was invalid anyway as expr now supports bignum? * tests/misc/test: Check for UINTMAX_OFLOW rather than using arbitrary 2^64 and 2^128. Check for INTMAX_UFLOW rather than using arbitrary -2^64 * tests/misc/timeout-parameters: Check for UINT_OFLOW rather than using arbitrary 2^32 * tests/misc/truncate-overflow: Don't depend on truncate to determine if we're on a 32 or 64 bit platform and instead use the various OFF_T limits * tests/misc/sort-merge: Check for UINTMAX_OFLOW rather than using arbitrary 2^64+1 * tests/misc/unexpand: ditto
2008-05-17tests: remove ugly /bin/sh wrapper around each perl-based test scriptJim Meyering
* 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-16tests: env-related clean upJim Meyering
* tests/Coreutils.pm: tiny clean-up: s/env/env --/ * tests/misc/help-version: Use "env" rather than an absolute file name prefix. * tests/misc/printf-surprise: Likewise.
2008-05-08tests: Coreutils.pm: support running a program that is a shell built-inJim Meyering
* tests/Coreutils.pm (run_tests): Add support for running a program like 'test', that is a shell built-in.
2008-05-06tests: remove directory, tests/head/Jim Meyering
* configure.ac (AC_CONFIG_FILES): Remove tests/head/Makefile. * tests/Makefile.am (SUBDIRS): Remove head. * tests/misc/head: New file, derived from ... * tests/head/Test.pm: ...this. Remove file. * tests/head/in: Remove file. * tests/head/in-1024: Remove file. * tests/Coreutils.pm (triple_test): New function.
2008-05-06tests: Coreutils.pm improvementsJim Meyering
* tests/Coreutils.pm: Allow test names longer than 12. Print a useful diagnostic for bogus spec entry. Handle the combination of IN_PIPE and ENV properly. * tests/Coreutils.pm (run_tests): Put ENV right before command, not before the "cat INPUT_FILE |" prefix.
2008-02-17Expand "ls --color" tests to also use the dircolors defaults.Jim Meyering
* tests/misc/ls-misc: Adjust this test so each is run twice. First, as usual, and the second time with LS_COLORS set using the default settings produced by running dircolors. * tests/Coreutils.pm: See below. This required some changes: - save and restore $ENV{LS_COLORS} for each individual test that requires a specific value. - Since this is the first test to call the run_tests command more than once, it has exposed that that function erroneously modifies the \@Tests array. Fix that in tests/Coreutils.pm.
2007-10-07New program: mktemp.Jim Meyering
* NEWS: Mention this. * README: Add mktemp to the list. * AUTHORS: Add this: mktemp: Jim Meyering * src/mktemp.c: New file. * src/Makefile.am (bin_PROGRAMS): Add mktemp. (mktemp_LDADD): Add $(LIB_GETHRXTIME). * man/mktemp.x: New file. * man/Makefile.am (dist_man_MANS): Add mktemp.1. (mktemp.1): New dependency. * man/.cvsignore: Add mktemp.1. * man/.gitignore: New file. * src/.cvsignore, src/.gitignore: Add mktemp. * tests/misc/mktemp: New file. * tests/misc/Makefile.am (TESTS): Add mktemp. * tests/Coreutils.pm (run_tests): Give the POST-test function access to stdout and stderr contents, so it can verify that the named-on-stdout file/dir does indeed exist and has proper permissions, etc. [po/ChangeLog] * POTFILES.in: Add src/mktemp.c.
2007-07-23Update all copyright notices to use the newer form.Jim Meyering
2007-07-10Change "version 2" to "version 3" in all copyright notices.Jim Meyering
2006-08-17Add/fix copyright notices and adjust to latest GNU FDL.Paul Eggert
2006-07-08* tests/Coreutils.pm: Remove one of two adjacent "then"s in a comment.Jim Meyering
2005-11-02Accept a new type of input specifier: IN_PIPE,Jim Meyering
to indicate that the input file should be piped into the command under test (via `cat FILE | $prog ...').
2005-08-13New keywords, ENV and ENV_DEL, to support tests/misc/date.Jim Meyering
2005-04-20(package Coreutils): Renamed from package Fetish.Paul Eggert