summaryrefslogtreecommitdiff
path: root/tests/misc/seq
AgeCommit message (Collapse)Author
2012-01-07maint: update quoting of "Try `prog --help'" to "Try 'prog --help'"Jim Meyering
Automatically adjust both the source (now in only one place) and all tests that expect the resulting output via this: git grep -l 'Try.*--help' src/system.h tests \ | xargs perl -pi -e 's/Try \\?`(\S+ --help)/Try '\''$1/'
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-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-02-18add missing copyright datesEric Blake
* NEWS: Add 2009 to copyright. * README: Likewise. * README-hacking: Likewise. * TODO: Likewise. * doc/Makefile.am: Likewise. * m4/prereq.m4: Likewise. * src/nl.c: Likewise. * src/seq.c: Likewise. * tests/cp/cp-i: Likewise. * tests/install/install-C: Likewise. * tests/install/install-C-root: Likewise. * tests/install/install-C-selinux: Likewise. * tests/misc/seq: Likewise. * tests/mv/mv-n: Likewise.
2009-02-14seq: Fix equal width calculation when '.' added to last numberPádraig Brady
Issue reported by Samuel Hapák. <http://lists.gnu.org/archive/html/bug-coreutils/2009-02/msg00139.html> * src/seq.c: Account for '.' added to "last" number. * tests/misc/seq: Add corresponding test. * NEWS: Mention the fix.
2008-10-26seq: improve quality of format-checking codePaul Eggert
* src/seq.c (validate_format): Remove. Migrate its checks into... (long_double_format): Report an error and exit if an error is found, instead of returning NULL. All callers changed. Use a more-consistent format for diagnostics. * tests/misc/seq: Adjust to the more-consistent format for diagnostics.
2008-10-25seq: revert Solaris 8 work-around that caused x86 regressionPaul Eggert
* src/seq.c: Don't include <math.h>, <float.h>. (abs_rel_diff): Remove. (print_numbers): Test for equality, not for an epsilonish value. This reverts 4827dd27b0c655a685947aaa01426a5ecba179f3, aka v6.10-185-g4827dd2, which broke 'seq' on the x86; for example, it causes "seq 9223372036854775807 9223372036854775808" to incorrectly output 3 numbers instead of 2. It's better to punish obsolescent hosts that have incorrectly-working floating-point than to punish correctly-working hosts. * tests/misc/seq: Use 0.9000000000000, rather than 0.90000000000000000000, to avoid tickling a bug in Solaris 8 strtold, which converts "0.9" and "0.9000000000000" correctly, but incorrectly converts "0.90000000000000000000" to a smaller value.
2008-09-26seq -0.1 0.1 2: print final number when locale's decimal point is ","Jim Meyering
* src/seq.c (print_numbers): Use strtold, not c_strtold to convert from just-formatted-using-asprintf string back to double, since asprintf may have used something other than "." as the decimal point. Reported by lsof@nodata.co.uk as <http://bugzilla.redhat.com/463556>. Thanks to Ondřej Vašík for discovering that the bug was locale-related. $ LC_ALL=cs_CZ.UTF-8 seq -0.1 0.1 2|grep 2.0 [Exit 1] $ seq -0.1 0.1 2|grep 2.0 2.0 * tests/check.mk (TESTS_ENVIRONMENT): Add LOCALE_FR_UTF8, for... * tests/misc/seq [locale-dec-pt]: New test for the above. * NEWS (bug fix): Mention it.
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-06fix typo in comments: s/ouput/output/Jim Meyering
adjust spelling in that same comment: s/localisation/localization/
2008-04-21tests: adjust perl -I to use $top_srcdir/tests, not $srcdir/..Jim Meyering
2008-04-21Revamp test-related Makefiles.Jim Meyering
One side-effect of this change is that "make check" now works even if you put "." early in your shell's search PATH (don't do that!). Remove all test-related Makefile.am files, except those generated by mk-script. Instead, tests/Makefile.am now lists not only the tests directly under tests/, but also those in tests/*/ that are not generated by mk-script, e.g., cp/abuse, cp/acl, mv/i-1, etc. A lot of these changes are like this: -. $srcdir/../lang-default +. $top_srcdir/tests/lang-default -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh * configure.ac (AC_CONFIG_FILES): Remove corresponding Makefiles. * tests/check.mk (vc_exe_in_TESTS): Relax syntax requirements. * tests/rwx-to-mode: Remove file. Rewritten as... * tests/test-lib.sh (rwx_to_mode_): ...this new function. * tests/Makefile.am (EXTRA_DIST): Remove rwx-to-mode. (SUBDIRS): Remove each dir with a removed Makefile.am. (EXTRA_DIST): Add $(TESTS). (TESTS): Add over 300 entries.
2008-02-19seq: give better diagnostics for invalid formats.Steven Schubiger
* src/seq.c: (validate_format): New function. (main): Use it. * tests/misc/seq (fmt-d, fmt-e): Test for expected diagnostics with invalid formats. * NEWS: Mention this change. * TODO: Remove this item. [jm: src/seq.c: make diagnostics more consistent tests/misc/seq (fmt-eos1): adjust the expected diagnostic ]
2008-02-18seq: give a proper diagnostic for an invalid --format=% optionJim Meyering
* src/seq.c (long_double_format): Handle '%' at end of string. * tests/misc/seq [fmt-eos1, fmt-eos2]: New tests for the bug. * NEWS: Mention this. Reported by Pádraig Brady.
2008-02-09tests: factor out the perl-requiring code in many test scriptsJim Meyering
* tests/require-perl: New file. * tests/Makefile.am (EXTRA_DIST): Add require-perl. * tests/dd/skip-seek: Use it, and remove manual tests. * tests/du/files0-from: Likewise. * tests/ls/nameless-uid: Likewise. * tests/misc/base64: Likewise. * tests/misc/basename: Likewise. * tests/misc/cut: Likewise. * tests/misc/date: Likewise. * tests/misc/dircolors: Likewise. * tests/misc/dirname: Likewise. * tests/misc/expand: Likewise. * tests/misc/expr: Likewise. * tests/misc/factor: Likewise. * tests/misc/fmt: Likewise. * tests/misc/fold: Likewise. * tests/misc/head-elide-tail: Likewise. * tests/misc/ls-misc: Likewise. * tests/misc/md5sum: Likewise. * tests/misc/md5sum-newline: Likewise. * tests/misc/mktemp: Likewise. * tests/misc/od: Likewise. * tests/misc/paste-no-nl: Likewise. * tests/misc/pr: Likewise. * tests/misc/pwd-long: Likewise. * tests/misc/seq: Likewise. * tests/misc/sha1sum: Likewise. * tests/misc/sha1sum-vec: Likewise. * tests/misc/sha224sum: Likewise. * tests/misc/sha256sum: Likewise. * tests/misc/sha384sum: Likewise. * tests/misc/sha512sum: Likewise. * tests/misc/sort-merge: Likewise. * tests/misc/stat-printf: Likewise. * tests/misc/sum: Likewise. * tests/misc/sum-sysv: Likewise. * tests/misc/test-diag: Likewise. * tests/misc/tsort: Likewise. * tests/misc/tty-eof: Likewise. * tests/misc/unexpand: Likewise. * tests/misc/wc-files0-from: Likewise. * tests/misc/xstrtol: Likewise. * tests/mv/i-1: Likewise. * tests/rm/empty-name: Likewise. * tests/rm/fail-eperm: Likewise. * tests/rm/unreadable: Likewise. (EXTRA_DIST): *do* require require-perl as a stand-alone, 'source'able script.
2007-11-17Correct preceding patch.Jim Meyering
* src/seq.c (print_numbers): Also handle first < last && step < 0. * tests/misc/seq [empty-rev]: New test for this case.
2007-11-16Port to Solaris 8 perl, which does not support "use warnings;".Paul Eggert
* tests/dd/skip-seek: Skip test if "use warnings;" fails. * tests/du/files0-from: Likewise. * tests/misc/base64: Likewise. * tests/misc/basename: Likewise. * tests/misc/cut: Likewise. * tests/misc/date: Likewise. * tests/misc/dircolors: Likewise. * tests/misc/dirname: Likewise. * tests/misc/expand: Likewise. * tests/misc/expr: Likewise. * tests/misc/factor: Likewise. * tests/misc/fmt: Likewise. * tests/misc/fold: Likewise. * tests/misc/head-elide-tail: Likewise. * tests/misc/ls-misc: Likewise. * tests/misc/md5sum: Likewise. * tests/misc/md5sum-newline: Likewise. * tests/misc/mktemp: Likewise. * tests/misc/od: Likewise. * tests/misc/paste-no-nl: Likewise. * tests/misc/pr: Likewise. * tests/misc/seq: Likewise. * tests/misc/sha1sum: Likewise. * tests/misc/sha1sum-vec: Likewise. * tests/misc/sha224sum: Likewise. * tests/misc/sha256sum: Likewise. * tests/misc/sha384sum: Likewise. * tests/misc/sha512sum: Likewise. * tests/misc/sort-merge: Likewise. * tests/misc/stat-printf: Likewise. * tests/misc/sum: Likewise. * tests/misc/test-diag: Likewise. * tests/misc/tsort: Likewise. * tests/misc/unexpand: Likewise. * tests/misc/wc-files0-from: Likewise. * tests/misc/xstrtol: Likewise. * tests/mv/i-1: Likewise. * tests/rm/empty-name: Likewise. * tests/rm/unreadable: Likewise.
2007-11-03seq: add another test for the %% bugJim Meyering
* tests/misc/seq (fmt-c): Test the other fixed case, too.
2007-11-03Fix bug with "seq 10.8 0.1 10.95", plus another bug with %% in format.Paul Eggert
* NEWS: Mention the %%-in-format bug fix. * src/seq.c (struct layout): New type. (long_double_format): New arg LAYOUT. Fill it in. Fix mishandling of %% in formats. (print_numbers): New arg LAYOUT. Don't convert LAST to output format when deciding whether to go slightly past LAST. Instead, convert X to output format and back. This fixes a bug reported by Andreas Schwab in <http://lists.gnu.org/archive/html/bug-coreutils/2007-10/msg00237.html> where "seq 10.8 0.1 10.95" would output 11.0 on platforms where 10.95 rounds to a value that prints as 11.0 when only one digit past the decimal point is asked for. (main): Compute layout, for benefit of print_numbers. * tests/misc/seq (float-3): Undo previous change, since the bug should be fixed now. (fmt-b): New test, for the %% bug.
2007-11-01Adjust a seq subtest not to depend on the vagaries of floating point.Jim Meyering
* tests/misc/seq (float-3): Use 10.94 as the endpoint, not 10.95, since 10.95 was precisely in the middle of the interval, and with a %.1f format could map to either 10.9 or 11.0. Reported by Mike Frysinger
2007-10-30Avoid seq floating-point test failure on FreeBSD 6.1.Jim Meyering
* tests/misc/seq (float-4): Also accept -0.0.
2007-09-15Move the sole test in tests/seq to tests/misc/seq.Jim Meyering
* tests/seq/basic: Move this file to ... * tests/misc/seq: ...here. Don't rely on $PROG in env. * tests/misc/Makefile.am (TESTS): Add seq. * tests/Makefile.am (SUBDIRS): Remove seq. * tests/seq: Remove the directory. * configure.ac (AC_CONFIG_FILES): Remove tests/seq/Makefile