1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2026-01-21 12:41:13 +00:00
uutils-coreutils/tests/by-util
Michael Debertol 4bbbe3a3f2
sort: implement numeric string comparison (#2070)
* sort: implement numeric string comparison

This implements -n and -h using a string comparison algorithm instead
of parsing each number to a f64 and comparing those.

This should result in a moderate performance increase and eliminate loss
of precision.

* cache parsed f64 numbers

For general numeric comparisons we have to parse numbers as f64,
as this behavior is explicitly documented by GNU coreutils.
We can however cache the parsed value to speed up comparisons.

* fix leading zeroes for negative numbers

* use more appropriate name for exponent

* improvements to the parse function

* move checks into main loop and fix thousands separator condition

* remove unneeded checks

* rustfmt
2021-04-17 13:49:35 +02:00
..
test_arch.rs Fix some tests to not use CmdResult fields 2021-04-10 23:30:50 +03:00
test_base32.rs tests ~ reorganize tests 2020-06-01 18:30:04 -05:00
test_base64.rs tests ~ reorganize tests 2020-06-01 18:30:04 -05:00
test_basename.rs Fix some tests to not use CmdResult fields 2021-04-10 23:30:50 +03:00
test_cat.rs Also disable on test_three_directories_and_file_and_stdin 2021-04-16 19:44:40 +02:00
test_chgrp.rs Fix some tests to not use CmdResult fields 2021-04-10 23:30:50 +03:00
test_chmod.rs rustfmt the recent change 2021-04-17 13:21:30 +02:00
test_chown.rs Fix some tests to not use CmdResult fields 2021-04-10 23:30:50 +03:00
test_chroot.rs Fix some tests to not use CmdResult fields 2021-04-10 23:30:50 +03:00
test_cksum.rs allow ignoring stdin write errors in tests 2021-04-09 11:16:36 +02:00
test_comm.rs tests ~ reorganize tests 2020-06-01 18:30:04 -05:00
test_cp.rs Fix some tests to not use CmdResult fields 2021-04-10 23:30:50 +03:00
test_csplit.rs csplit: refresh of the previous PR 2020-12-28 17:21:29 +01:00
test_cut.rs cut: add gnu compatability to error messages 2021-04-03 20:55:10 +03:00
test_date.rs Fix some tests to not use CmdResult fields 2021-04-10 23:30:50 +03:00
test_df.rs tests ~ reorganize tests 2020-06-01 18:30:04 -05:00
test_dircolors.rs tests ~ reorganize tests 2020-06-01 18:30:04 -05:00
test_dirname.rs tests ~ reorganize tests 2020-06-01 18:30:04 -05:00
test_du.rs rustfmt the recent change 2021-04-17 13:21:30 +02:00
test_echo.rs rustfmt the recent change 2021-04-17 13:21:30 +02:00
test_env.rs rustfmt the recent change 2021-04-17 13:21:30 +02:00
test_expand.rs Fix some tests to not use CmdResult fields 2021-04-10 23:30:50 +03:00
test_expr.rs tests ~ reorganize tests 2020-06-01 18:30:04 -05:00
test_factor.rs Fix some tests to not use CmdResult fields 2021-04-10 23:30:50 +03:00
test_false.rs tests ~ reorganize tests 2020-06-01 18:30:04 -05:00
test_fmt.rs Fix some tests to not use CmdResult fields 2021-04-10 23:30:50 +03:00
test_fold.rs rustfmt the recent change 2021-04-17 13:21:30 +02:00
test_groups.rs Fix some tests to not use CmdResult fields 2021-04-10 23:30:50 +03:00
test_hashsum.rs Fix some tests to not use CmdResult fields 2021-04-10 23:30:50 +03:00
test_head.rs Rewrote head (#1911) 2021-03-29 13:08:48 +02:00
test_hostid.rs Fix some tests to not use CmdResult fields 2021-04-10 23:30:50 +03:00
test_hostname.rs rustfmt the recent change 2021-04-17 13:21:30 +02:00
test_id.rs rustfmt the recent change 2021-04-17 13:21:30 +02:00
test_install.rs Fix some tests to not use CmdResult fields 2021-04-10 23:30:50 +03:00
test_join.rs tests ~ reorganize tests 2020-06-01 18:30:04 -05:00
test_kill.rs tests ~ add missing test_UTIL module files (with 'ToDO' comments) 2020-06-02 11:25:09 -05:00
test_link.rs tests ~ reorganize tests 2020-06-01 18:30:04 -05:00
test_ln.rs Fix some tests to not use CmdResult fields 2021-04-10 23:30:50 +03:00
test_logname.rs Fix some tests to not use CmdResult fields 2021-04-10 23:30:50 +03:00
test_ls.rs ls: make path platform independent 2021-04-16 23:48:35 +02:00
test_mkdir.rs fix(mkdir) - Add --parent as alias of --parents 2020-12-18 14:41:59 +01:00
test_mkfifo.rs mkfifo: general refactor, move to clap, add tests (#1945) 2021-03-27 20:00:59 +01:00
test_mknod.rs tests ~ add missing test_UTIL module files (with 'ToDO' comments) 2020-06-02 11:25:09 -05:00
test_mktemp.rs fix(mktemp) - Make mktemp --tempdir foo.XXXXXX works (#1716) 2021-02-11 00:03:23 +01:00
test_more.rs more: add error message if the argument is a directory (#1983) 2021-04-02 22:34:02 +02:00
test_mv.rs refactor(mv): move to clap (#1652) 2020-12-10 22:28:17 +01:00
test_nice.rs Rustfmt new tests 2021-03-18 10:24:30 +01:00
test_nl.rs Rustfmt new tests 2021-03-18 10:24:30 +01:00
test_nohup.rs nohup: move from getopts to clap (#1871) 2021-03-22 20:09:00 +01:00
test_nproc.rs style(nproc): reformat with rustfmt 2020-06-09 13:38:29 +02:00
test_numfmt.rs numfmt: implement --delimiter 2021-03-15 11:55:56 -04:00
test_od.rs od: refactor tests for #1982 2021-04-01 02:16:15 +02:00
test_paste.rs paste: cleanup multi-stdin support (#1803) 2021-03-12 13:26:09 +01:00
test_pathchk.rs Add pre-commit hook + run fmt (#1959) 2021-03-30 21:24:01 +02:00
test_pinky.rs tests ~ reorganize tests 2020-06-01 18:30:04 -05:00
test_printenv.rs tests ~ reorganize tests 2020-06-01 18:30:04 -05:00
test_printf.rs tests ~ reorganize tests 2020-06-01 18:30:04 -05:00
test_ptx.rs ptx: ignore empty regex (#1808) 2021-03-12 21:52:37 +01:00
test_pwd.rs refactor(pwd): move to clap + add a test 2020-11-03 23:12:16 +01:00
test_readlink.rs tests ~ reorganize tests 2020-06-01 18:30:04 -05:00
test_realpath.rs realpath: refactor tests for #1982 2021-04-05 23:55:02 +02:00
test_relpath.rs relpath: refactor tests for #1982 2021-04-05 21:48:39 +02:00
test_rm.rs rm: refactor tests for #1982 2021-04-06 00:04:49 +02:00
test_rmdir.rs Rustfmt new tests 2021-03-18 10:24:30 +01:00
test_seq.rs rustfmt some tests 2021-03-13 23:30:47 +01:00
test_shred.rs shred: Implemented --force option (#2012) 2021-04-10 10:41:59 +02:00
test_shuf.rs fixed panic! formatting 2021-03-31 13:30:06 +02:00
test_sleep.rs sleep: Add more test cases 2021-03-15 14:36:38 +01:00
test_sort.rs sort: implement numeric string comparison (#2070) 2021-04-17 13:49:35 +02:00
test_split.rs Refactor(split) - migrate from getopts to clap (#1712) 2021-02-11 20:45:23 +01:00
test_stat.rs tests ~ reorganize tests 2020-06-01 18:30:04 -05:00
test_stdbuf.rs do not pipe data into failure tests (#2072) 2021-04-17 10:07:45 +02:00
test_sum.rs sum: fix crash on invalid inputs, move to clap, add tests (#1952) 2021-03-29 13:03:56 +02:00
test_sync.rs unbreak build with rustc 1.32: force tempfile 3.1.0 (#1695) 2021-01-19 08:15:53 +01:00
test_tac.rs tac: exit with proper code, move from getopts to clap, add test for invalid inputs (#1957) 2021-03-31 21:21:10 +02:00
test_tail.rs fix(tail): add support for negative indexing (#1865) 2021-03-22 10:01:54 +01:00
test_tee.rs tee: refactor tests for #1982 2021-04-05 23:05:07 +02:00
test_test.rs tests ~ reorganize tests 2020-06-01 18:30:04 -05:00
test_timeout.rs rustfmt some tests 2021-03-13 23:30:47 +01:00
test_touch.rs touch: dealing with DST in touch -m -t (#2073) 2021-04-17 10:08:10 +02:00
test_tr.rs tr: process octal escape sequences 2021-03-17 08:04:45 -04:00
test_true.rs tests ~ reorganize tests 2020-06-01 18:30:04 -05:00
test_truncate.rs tests(truncate): Add more tests 2020-10-23 00:36:09 +02:00
test_tsort.rs tsort: move from getopts to clap (#1867) 2021-03-22 18:16:28 +01:00
test_tty.rs tty: Move from getopts to clap (#1956) 2021-03-29 13:00:47 +02:00
test_uname.rs feature(uname): Implement -p & -i (#1649) 2020-12-11 22:46:36 +01:00
test_unexpand.rs feat(unexpand): move from getopts to clap (#1883) 2021-03-23 09:42:05 +01:00
test_uniq.rs uniq: implement group option 2021-04-04 15:22:17 +05:30
test_unlink.rs Rustfmt new tests 2021-03-18 10:24:30 +01:00
test_uptime.rs refactor(uptime): some minor improvements 2020-11-03 23:10:32 +01:00
test_users.rs tests ~ reorganize tests 2020-06-01 18:30:04 -05:00
test_wc.rs cat: Unrevert splice patch (#2020) 2021-04-10 22:19:53 +02:00
test_who.rs tests ~ reorganize tests 2020-06-01 18:30:04 -05:00
test_whoami.rs tests/refactor ~ use is_ci() for CI host platform testing 2020-06-14 12:20:31 -05:00
test_yes.rs tests ~ add missing test_UTIL module files (with 'ToDO' comments) 2020-06-02 11:25:09 -05:00