<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/tests/misc/seq.pl, branch v8.22</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v8.22</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v8.22'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2013-01-26T02:37:13Z</updated>
<entry>
<title>seq: fix to always honor the step value</title>
<updated>2013-01-26T02:37:13Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2013-01-22T11:13:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=2238ab574191d30b89a007b760c616efaf9c219c'/>
<id>urn:sha1:2238ab574191d30b89a007b760c616efaf9c219c</id>
<content type='text'>
* src/seq.c (main): With 3 positive integer args we were
checking the end value was == "1", rather than the step value.
* tests/misc/seq.pl: Add tests for this case.
Reported by Marcel Böhme in http://bugs.gnu.org/13525
</content>
</entry>
<entry>
<title>seq: fix misaligment with -w when no precision for start value</title>
<updated>2013-01-26T02:35:58Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2013-01-09T12:23:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=326e5855bc8dd3d0c5b2c0e461c65879d2b5694d'/>
<id>urn:sha1:326e5855bc8dd3d0c5b2c0e461c65879d2b5694d</id>
<content type='text'>
* src/seq.c (get_default_format): Also account for the case where '.'
is auto added to the start value, which is significant when the
number sequence narrows.
* tests/misc/seq.pl: Add two new tests for the failing cases.
* NEWS: Mention the fix.
Fixes http://bugs.gnu.org/13394
</content>
</entry>
<entry>
<title>maint: update all copyright year number ranges</title>
<updated>2013-01-01T03:51:20Z</updated>
<author>
<name>Jim Meyering</name>
<email>jim@meyering.net</email>
</author>
<published>2013-01-01T02:54:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=77da73c75432f3c5b4beebae7b0797a1e33160bc'/>
<id>urn:sha1:77da73c75432f3c5b4beebae7b0797a1e33160bc</id>
<content type='text'>
Run "make update-copyright", but then also run this,
  perl -pi -e 's/2\d\d\d-//' tests/sample-test
to make that one script use the single most recent year number.
</content>
</entry>
<entry>
<title>seq: fix newline output when -s specified</title>
<updated>2012-12-21T15:55:19Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2012-12-19T19:27:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=76f606a9544bd67629bd4766ff6efe8bf42b20d9'/>
<id>urn:sha1:76f606a9544bd67629bd4766ff6efe8bf42b20d9</id>
<content type='text'>
This regression was introduced in commit v8.19-132-g3786fb6.

* src/seq.c (seq_fast): Don't use puts() to output the first number,
and instead insert it into the buffer as for other numbers.
Also output the terminator unconditionally.
* tests/misc/seq.pl: Add some basic tests for the -s option.
* NEWS: Mention the fix.
* THANKS.in: Reported by Philipp Gortan.
</content>
</entry>
<entry>
<title>seq: ensure correct output width for scientific notation input</title>
<updated>2012-11-24T15:25:19Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2012-11-23T03:06:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=64d4a2807d46a85cfe5ab7eb99b3e91b9a75d5ab'/>
<id>urn:sha1:64d4a2807d46a85cfe5ab7eb99b3e91b9a75d5ab</id>
<content type='text'>
* src/seq.c (scan_arg): Calculate the width more accurately
for numbers specified using scientific notation.
* tests/misc/seq.pl: Add tests for cases that were mishandled.
* NEWS: Mention the fix.
* THANKS.in: Reported by Marcel Böhme.
Fixes http://bugs.gnu.org/12959
</content>
</entry>
<entry>
<title>seq: 70x faster for non-negative whole numbers and incr==1</title>
<updated>2012-09-14T11:34:51Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-09-13T16:09:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=77f89d014be68e42de5107aee0be95d18ee1735c'/>
<id>urn:sha1:77f89d014be68e42de5107aee0be95d18ee1735c</id>
<content type='text'>
Handle non-negative whole numbers robustly and efficiently when
the increment is 1 and when no format-changing option is specified.
On the correctness front, for very large numbers, seq now works fine:

    $ b=1000000000000000000000000000
    $ src/seq ${b}09 ${b}11
    100000000000000000000000000009
    100000000000000000000000000010
    100000000000000000000000000011

while the old one would infloop, printing garbage:

    $ seq ${b}09 ${b}11 | head -2
    99999999999999999997315645440
    99999999999999999997315645440

The new code is much more efficient, too:
Old vs new: 55.81s vs 0.82s

  $ env time --f=%e seq $((10**8)) &gt; /dev/null
  55.81
  $ env time --f=%e src/seq $((10**8)) &gt; /dev/null
  0.82

* seq.c (incr): New function, inspired by the one in cat.c.
(cmp, seq_fast): New functions, inspired by code in nt-factor
by Torbjörn Granlund and Niels Möller.
(trim_leading_zeros): New function, without which cmp would malfunction.
(all_digits_p): New function.
(main): Hoist the format_str-vs-equal_width check to precede first
treatment of operands, and insert code to call seq_fast when possible.
* NEWS (Bug fixes): Mention the correctness fix.
(Improvements): Mention the speed-up.
* tests/misc/seq.pl: Exercise the new code.

Improved by: Bernhard Voelker.
http://thread.gmane.org/gmane.comp.gnu.coreutils.general/3340
</content>
</entry>
<entry>
<title>tests: add .sh and .pl suffixes to shell and perl tests, respectively</title>
<updated>2012-08-30T16:55:59Z</updated>
<author>
<name>Stefano Lattarini</name>
<email>stefano.lattarini@gmail.com</email>
</author>
<published>2012-08-30T12:13:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=9eb4c31eb78c28dd9f72d1cbb940270311be343c'/>
<id>urn:sha1:9eb4c31eb78c28dd9f72d1cbb940270311be343c</id>
<content type='text'>
Not only this shrinks the size of the generated Makefile (from &gt; 6300
lines to ~3000), but will allow further simplifications in future
changes.

* tests/Makefile.am (TEST_EXTENSIONS): Add '.sh' and '.pl'.
(PL_LOG_COMPILER, SH_LOG_COMPILER): New, still defined simply to
$(LOG_COMPILER) for the time being.
(TESTS, root_tests): Adjust as described.
* All tests: Rename as described.
</content>
</entry>
</feed>
