Commit graph

7315 commits

Author SHA1 Message Date
Terts Diepraam
938c5acbbe
Merge pull request #3146 from ndd7xv/split-suffix-check
split: error when num. of chunks is greater than num. of possible filenames
2022-02-20 17:12:05 +01:00
xxyzz
744592e221
Change the owner of gcda files to the current user 2022-02-20 19:15:48 +08:00
xxyzz
fe8910350c
Run GNU root tests at the end
This should fix the profiling permission denied error on non-root tests
2022-02-20 18:29:18 +08:00
Sylvestre Ledru
9adaf5c288
Merge pull request #3045 from xxyzz/main
Create coverage report for GNU tests
2022-02-20 10:57:12 +01:00
Sylvestre Ledru
bc3f540a1b
Merge pull request #2965 from tertsdiepraam/test-wsl-exec-permission
`test`: fix wsl executable permission
2022-02-20 10:36:13 +01:00
Sylvestre Ledru
73051809a7
Merge pull request #3018 from Narasimha1997/fix-cp-recursion
Fix: Avoid infinite recursion when source and destinations are same while using `cp -R`
2022-02-20 10:34:34 +01:00
Sylvestre Ledru
42eba6c5b2
Merge pull request #3107 from jfinkels/split-elide-empty-files
split: add support for -e argument
2022-02-20 10:32:57 +01:00
Sylvestre Ledru
6bf575ad56
Merge branch 'main' into cp-lb 2022-02-20 10:31:13 +01:00
Sylvestre Ledru
5bbc2cedf4
Merge pull request #3054 from jfinkels/dd-progress-module
dd: collect progress reporting into its own module
2022-02-20 10:17:54 +01:00
Sylvestre Ledru
83d2f550ab try to use rust-cache on github action to build faster 2022-02-19 21:26:34 +01:00
Sylvestre Ledru
f222dedf85
Merge pull request #3164 from palaster/fix-issue-3162
Added b2sum and b3sum utility entries
2022-02-19 21:12:39 +01:00
Pat Laster
2cd84c2b70 Added b2sum and b3sum utility entries 2022-02-19 11:41:51 -06:00
Jeffrey Finkelstein
b09bae2acf dd: collect progress reporting into its own module
Collect structs, implementations, and functions that have to do with
reporting number of blocks read and written into their own new module,
`progress.rs`. This commit also adds docstrings for everything and
unit tests for the significant methods. This commit does not change
the behavior of `dd`, just the organization of the code to make it
more maintainable and testable.
2022-02-19 10:39:40 -05:00
Jeffrey Finkelstein
6900638ac6 dd: don't error when outfile is /dev/null
Prevent `dd` from terminating with an error when given the
command-line argument `of=/dev/null`. This commit allows the call to
`File::set_len()` to result in an error without causing the process to
terminate prematurely.
2022-02-19 10:29:09 -05:00
Terts Diepraam
1a7e5c4cc5
Merge pull request #3154 from jfinkels/dd-truncated-records
dd: correct order and phrasing of truncated record
2022-02-19 15:58:12 +01:00
Terts Diepraam
c56a879a68
Merge pull request #3160 from sylvestre/doc-order
user docs: move the examples after the options
2022-02-19 15:53:37 +01:00
Sylvestre Ledru
be0b77e7a7 when help item has an \n, translate it to a <br />
example:
https://uutils.github.io/coreutils-docs/user/utils/ls.html / classify
2022-02-19 13:44:15 +01:00
Sylvestre Ledru
716444c7b1 user docs: move the examples after the options 2022-02-19 12:46:57 +01:00
Sylvestre Ledru
bbd74bb957
Merge pull request #3159 from crazystylus/expr-missing-help-docs
`expr`: fix missing help in user docs
2022-02-19 11:04:14 +01:00
Sylvestre Ledru
7870317178
Merge pull request #3152 from tertsdiepraam/docs-examples
docs: add examples from tldr-pages
2022-02-19 09:49:45 +01:00
Kartik Sharma
c523aa43f2 Fixes missing help on expr user docs.
- Configured clap to take crate version, so version is now visible in docs.
- Added ABOUT string from expr help output, so about section is getting rendered in docs.
- Added USAGE section.
- Added HELP section for each args.
2022-02-19 13:47:16 +05:30
Jeffrey Finkelstein
766c85fb5e dd: correct order and phrasing of truncated record
Place the "truncated records" line below the "records out" line in the
status report produced by `dd` and properly handle the singularization
of the word "record" in the case of 1 truncated record. This matches
the behavior of GNU `dd`.

For example

    $ printf "ab" | dd cbs=1 conv=block status=noxfer > /dev/null
    0+1 records in
    0+1 records out
    1 truncated record

    $ printf "ab\ncd\n" | dd cbs=1 conv=block status=noxfer > /dev/null
    0+1 records in
    0+1 records out
    2 truncated records
2022-02-18 23:49:33 -05:00
Terts Diepraam
4719717e33
Merge pull request #3128 from jfinkels/dd-zero-multiplier-regression
dd: remove spurious zero multiplier warning
2022-02-19 01:37:33 +01:00
Terts Diepraam
625c771d14
Merge pull request #3112 from ndd7xv/err_conv-to-result
uucore(memo): replace err_conv with result
2022-02-19 01:29:07 +01:00
Terts Diepraam
69a94e412b docs: use rust libraries for downloading and unzipping tldr 2022-02-19 01:27:19 +01:00
Sylvestre Ledru
3da6be1829
Merge pull request #3153 from rivy/maint
CICD fixes/maintainence
2022-02-18 09:58:15 +01:00
Terts Diepraam
a3d52f3863
Merge pull request #3071 from hbina/hbina-ls-propagate-write-errors
ls: Propagate (almost) all write errors up
2022-02-18 08:41:00 +01:00
ndd7xv
f04f22b012 uucore(memo): refactor error propogation with new SubError enum 2022-02-17 22:43:30 -05:00
ndd7xv
1e12c46c24 uucore(memo): replace err_conv with result 2022-02-17 22:43:30 -05:00
Hanif Ariffin
8acdfdc553 Merge branch 'main' of github.com:uutils/coreutils into hbina-ls-propagate-write-errors
Signed-off-by: Hanif Ariffin <hanif.ariffin.4326@gmail.com>
2022-02-18 09:48:20 +08:00
Jeffrey Finkelstein
89f428b44f dd: remove spurious zero multiplier warning
Fix a bug in which `dd` was inappropriately showing a warning about a
"0x" multiplier when there was no "x" character in the argument.
2022-02-17 19:06:05 -05:00
Jeffrey Finkelstein
6718d97f97 split: add support for -e argument
Add the `-e` flag, which indicates whether to elide (that is, remove)
empty files that would have been created by the `-n` option.

The `-n` command-line argument gives a specific number of chunks into
which the input files will be split. If the number of chunks is
greater than the number of bytes, then empty files will be created for
the excess chunks. But if `-e` is given, then empty files will not be
created.

For example, contrast

    $ printf 'a\n' > f && split -e -n 3 f && cat xaa xab xac
    a
    cat: xac: No such file or directory

with

    $ printf 'a\n' > f && split -n 3 f && cat xaa xab xac
    a
2022-02-17 19:03:51 -05:00
Terts Diepraam
87dc692889
Merge branch 'main' into split-suffix-check 2022-02-17 23:23:58 +01:00
Terts Diepraam
e1a611374a
Merge pull request #2981 from jfinkels/split-hex-numbers
split: add support for -x option (hex suffixes)
2022-02-17 23:20:58 +01:00
Terts Diepraam
b082b98b7c
Merge pull request #3056 from palaster/fix-issue-2870
seq: Eliminated special handling of -0.0
2022-02-17 23:18:54 +01:00
Roy Ivy III
d6424bb354 maint/util ~ remove extra/redundant factor tests for 'debug' builds
- avoids "Terminated" timeout errors when using longer running 'debug' `factor`
2022-02-17 15:14:52 -06:00
Roy Ivy III
0af2c9bafb maint/CICD ~ (GnuTests) display sub-step test comparison failures more prominently 2022-02-17 15:14:51 -06:00
Terts Diepraam
f57e3470ae docs: add examples from tldr-pages 2022-02-17 19:35:56 +01:00
Sylvestre Ledru
299fe4e22a
Merge pull request #3151 from tertsdiepraam/docs-test-coverage
README: add link to GNU tests page in documentation
2022-02-17 10:29:31 +01:00
Terts Diepraam
f15dd8f599 README: add link to GNU tests page in documentation 2022-02-17 10:28:06 +01:00
Sylvestre Ledru
8e79b7fcb8
Merge pull request #3141 from jfinkels/dd-modules
dd: move unit tests into dd.rs and test_dd.rs
2022-02-17 10:15:07 +01:00
ndd7xv
494d709e0f split: small tweaks to wording
changes `SuffixType` enums to have better names and hex suffix help to be consistent with numeric suffix help
2022-02-17 01:04:26 -05:00
xxyzz
c16c06ea0d
df: add output option's valid field names 2022-02-17 13:43:59 +08:00
ndd7xv
6c3fc7b214 split: throw error when # chunks > # filenames from suffix length 2022-02-16 23:53:56 -05:00
Jeffrey Finkelstein
4470430c89 split: add support for -x option (hex suffixes)
Add support for the `-x` command-line option to `split`. This option
causes `split` to produce filenames with hexadecimal suffixes instead
of the default alphabetic suffixes.
2022-02-16 23:53:56 -05:00
Jeffrey Finkelstein
891c5d1ffa split: add SuffixType::NumericHexadecimal
Add a `NumericHexadecimal` member to the `SuffixType` enum so that a
future commit can add support for hexadecimal filename suffixes to the
`split` program.
2022-02-16 23:53:56 -05:00
Jeffrey Finkelstein
aa4c5aea50 split: refactor to add SuffixType enum
Refactor the code to use a `SuffixType` enumeration with two members,
`Alphabetic` and `NumericDecimal`, representing the two currently
supported ways of producing filename suffixes. This prepares the code
to more easily support other formats, like numeric hexadecimal.
2022-02-16 23:53:56 -05:00
Terts Diepraam
9e847c33e3
Merge pull request #3021 from iovanom/dd-multi-status-options
dd: allow multiple instances of arguments
2022-02-16 12:56:30 +01:00
Terts Diepraam
cb54e76151
Merge pull request #3145 from TheBorrowCheckers/cat-cleanup
cat: minor cleanups
2022-02-16 12:52:54 +01:00
Jeffrey Finkelstein
ba1ce7179b dd: move unit tests into dd.rs and test_dd.rs
Clean up unit tests in the `dd` crate to make them easier to
manage. This commit does a few things.

* move test cases that test the complete functionality of the `dd`
  program from the `dd_unit_tests` module up to the
  `tests/by-util/test_dd.rs` module so that they can take advantage of
  the testing framework and common testing tools provided by uutils,
* move test cases that test internal functions of the `dd`
  implementation into the `tests` module within `dd.rs` so that they
  live closer to the code they are testing,
* replace test cases defined by macros with test cases defined by
  plain old functions to make the test cases easier to read at a
  glance.
2022-02-15 21:50:48 -05:00