<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/tests/misc/sort, branch v8.7</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v8.7</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v8.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2010-08-13T22:57:52Z</updated>
<entry>
<title>* tests/misc/sort (use-nl): Fix comment to match the test case.</title>
<updated>2010-08-13T22:57:52Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2010-08-13T22:57:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=b5f9a6a176a32d73745fc61366c26f2c1ff9fca7'/>
<id>urn:sha1:b5f9a6a176a32d73745fc61366c26f2c1ff9fca7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>sort: support all combinations of -d, -f, -i, -R, and -V</title>
<updated>2010-08-07T04:30:50Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2010-08-07T04:30:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=b877ea4b3ee4c62ab75caedbfdcca4877961aedf'/>
<id>urn:sha1:b877ea4b3ee4c62ab75caedbfdcca4877961aedf</id>
<content type='text'>
* NEWS: Document this.
* src/sort.c (getmonth): Omit LEN arg, as MONTH is now null-terminated.
(compare_random): Don't null-terminate keys, as caller now does that.
(compare_version): Remove.
(debug_key): Null-terminate string for getmonth.
(keycompare): Support combining -R with any of -d, -f, -i, -V.
Also, support combining -V with any of -d, -i.
(check_ordering_compatibility): Allow newly-supported combinations.
* tests/misc/sort (02q, 02r, 02s): New tests, for new combinations.
(incompat2): Now test -nR, since -fR are now compatible.
</content>
</entry>
<entry>
<title>sort: revert recent -h changes and use a more-conservative approach</title>
<updated>2010-08-03T02:21:02Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2010-08-03T02:18:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=94615d2acfdccbbeb8eb6f8931d0e252b05e1484'/>
<id>urn:sha1:94615d2acfdccbbeb8eb6f8931d0e252b05e1484</id>
<content type='text'>
* NEWS: Document changes to sort -h, which are now minor with
respect to the pre-July-30th version.
* doc/coreutils.texi (sort invocation): Likewise.  The
documentation now describes how -h comparison is done rather than
being vague with border cases.
* src/sort.c (long_double, strtold): Move back to general_numcompare.
(LD, compute_human): Remove.
(find_unit_order): Remove THOU_SEP parameter, since thousands
separators are now allowed by all callers.  Revert to previous
behavior of sorting by suffix, and returning the order rather than
2 * order + binary, since we no longer care whether binary powers
are being used.  However, treat all zeros the same, instead of
sorting 0M before 0G; this is more consistent with the desired
behavior of sorting -1G before -1M.
* tests/misc/sort (h1, h3, h6): Adjust to match mostly-reverted
behavior.  However, check that all zeros sort together.
* tests/misc/sort-debug-keys: Omit a "_", since the trailing "i"
in "1234Gi" is no longer part of the key.
</content>
</entry>
<entry>
<title>sort: -h now handles comparisons such as 6000K vs 5M and 5MiB vs 5MB</title>
<updated>2010-07-30T07:53:46Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2010-07-30T07:52:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=abd040180e210e74448c42f094aab1769ca6c636'/>
<id>urn:sha1:abd040180e210e74448c42f094aab1769ca6c636</id>
<content type='text'>
* NEWS: Document changes to sort -h.
* doc/coreutils.texi (sort invocation): Likewise.
* src/sort.c (long_double, strtold): Move to prelude, since they're
now used by multiple functions.
(LD): New macro.
(struct keyfield.iec_present): Remove this member.  All uses removed.
(check_mixed_SI_IEC): Remove.  This code was busted in the presence
of multiple threads, as it had a race condition.
(find_unit_order): Remove arg KEY; add arg THOU_SEP; arg ENDPTR is
now char ** rather than char const **.  Return an integer that
distinguishes decimal from binary powers.  Parse the number
consistently with the intersection of strtold and strnumcmp.
Set *ENDPTR unconditionally.
(compute_human): New static function.
(human_numcompare): Remove arg KEY.  Remove 'const' from other args.
Use strnumcmp if possible, but fall back on floating point if not.
(numcompare, general_numcompare): Arg EA is now char ** rather
than char const **.
(numcompare): Adjust to new find_unit_order signature and behavior.
(keycompare): Adjus to new human_numcompare signature.
* tests/misc/sort (h1, h3, h4, h6): Adjust to new behavior.
* tests/misc/sort-debug-keys: Likewise.
</content>
</entry>
<entry>
<title>sort: fix bug with EOF at buffer refill</title>
<updated>2010-07-27T03:51:19Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2010-07-27T03:51:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=c8d3838681de7137a3eb1127c4c4486023bd2f00'/>
<id>urn:sha1:c8d3838681de7137a3eb1127c4c4486023bd2f00</id>
<content type='text'>
* src/sort.c (fillbuf): Don't append eol unless the line is nonempty.
This fixes a bug that was partly but not completely fixed by
the aadc67dfdb47f28bb8d1fa5e0fe0f52e2a8c51bf commit (dated July 15).
* tests/misc/sort (realloc-buf-2): New test, which catches this
bug on 64-bit hosts.
</content>
</entry>
<entry>
<title>tests: remove unnecessary single quotes in perl hash use: -&gt;{'SYM'}</title>
<updated>2010-05-31T08:59:11Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2010-05-15T15:58:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=f385d97a4144a30e23bc35ce8ec33c26b6cd84e9'/>
<id>urn:sha1:f385d97a4144a30e23bc35ce8ec33c26b6cd84e9</id>
<content type='text'>
Run this command:
  git grep -l "limits-&gt;{'" \
    | xargs perl -pi -e "s/limits-&gt;{'(.*?)'}/limits-&gt;{\$1}/g"
* cfg.mk (sc_prohibit_perl_hash_quotes): New rule to match.
* tests/misc/join: Remove quotes.
* tests/misc/sort: Likewise.
* tests/misc/sort-merge: Likewise.
* tests/misc/test: Likewise.
* tests/misc/unexpand: Likewise.
* tests/misc/uniq: Likewise.
</content>
</entry>
<entry>
<title>sort: fix parsing of end field in obsolescent key formats</title>
<updated>2010-04-20T21:37:18Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2010-04-20T15:25:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=8fc12909f649fbe75eb84c48ace554ae3e4e6c06'/>
<id>urn:sha1:8fc12909f649fbe75eb84c48ace554ae3e4e6c06</id>
<content type='text'>
This regression was introduced in commit 224a69b5, 2009-02-24,
"sort: Fix two bugs with determining the end of field".
The specific regression being that we include 1 field too many when
an end field is specified using obsolescent key syntax (+POS -POS).

* src/sort.c (struct keyfield): Clarify the description of the eword
member, as suggested by Alan Curry.
(main): When processing obsolescent format key specifications,
normalize eword to a zero based count when no specific end char is given
for an end field. This matches what's done when keys are specified with -k.
* tests/misc/sort: Add a few more tests for the obsolescent key formats,
with test 07i being the particular failure addressed by this change.
* THANKS: Add Alan Curry who precisely identified the issue.
* NEWS: Mention the fix.
Reported by Santiago Rodríguez
</content>
</entry>
<entry>
<title>maint: update all FSF copyright year lists to include 2010</title>
<updated>2010-01-01T13:06:47Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2010-01-01T09:56:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=1aa17dc89b3f313697661541adca0aa0defbdc09'/>
<id>urn:sha1:1aa17dc89b3f313697661541adca0aa0defbdc09</id>
<content type='text'>
Use this command:
git ls-files | grep -v COPYING \
  | xargs env UPDATE_COPYRIGHT_USE_INTERVALS=1 \
      build-aux/update-copyright
</content>
</entry>
<entry>
<title>sort: allow SI and IEC units on separate human sort fields</title>
<updated>2009-07-03T16:00:55Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2009-06-29T23:52:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=acc01947af2e025d11016f3a4b0a26beb06dd120'/>
<id>urn:sha1:acc01947af2e025d11016f3a4b0a26beb06dd120</id>
<content type='text'>
* src/sort.c: Store the si_present state per key rather than globally
* tests/misc/sort: Add a check that would have previously failed.
Also add a test to demonstrate that invalid IEC/SI mixtures are not
always noticed when they're not significant to the sort.
</content>
</entry>
<entry>
<title>sort: Ignore fields where end position is before the start position</title>
<updated>2009-06-13T00:25:06Z</updated>
<author>
<name>Cliff Miller</name>
<email>cbm@whatexit.org</email>
</author>
<published>2009-06-11T17:30:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=24c727d3c26122c4f1c29381e7c6f5d96985ccca'/>
<id>urn:sha1:24c727d3c26122c4f1c29381e7c6f5d96985ccca</id>
<content type='text'>
* NEWS: Mention the fix
* THANKS: Add Cliff Miller
* src/sort.c (keycompare): Ensure lima &gt;= texta
* tests/misc/sort: Add 3 corresponding tests

Signed-off-by: Pádraig Brady &lt;P@draigBrady.com&gt;
</content>
</entry>
</feed>
