1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 19:17:43 +00:00
Commit graph

28 commits

Author SHA1 Message Date
3ea679a29e
echo: print help if not posixly corrent and only argument is --help 2025-07-12 01:37:07 +03:00
Dorian Peron
6e23d4e979 tests: patch tests to simplify imports 2025-07-01 03:36:46 +02:00
Alexander
7d5cfbc4b6
Merge pull request #7881 from alexs-sh/7736-control-flow-experiments
uucore/echo:handle ControlFlow result
2025-05-05 00:33:51 +02:00
cerdelen
13c0a813eb
Remove clap for echo (#7603)
* Parsing echo flags manually without clap as clap introduced various problematic interactions with hyphens

* fixed error where multiple flags would parse wrong

* Spelling & formatting fixes

* docu for EchoFlag struct

* more extensive comment/documentation

* revert POSIXLY_CORRECT check to only check if it is set

* Fixed problem of overwriting flags. Added test for same issue

* cargo fmt

* cspell

* Update src/uu/echo/src/echo.rs

Enabling POSIXLY_CORRECT flag if value is not UTF-8

Co-authored-by: Jan Verbeek <jan.verbeek@posteo.nl>

---------

Co-authored-by: Jan Verbeek <jan.verbeek@posteo.nl>
2025-05-04 20:13:52 +02:00
Dorian Péron
61b7f4b54b
Merge pull request #7598 from sylvestre/uutests2
Move our tests infra into a dedicated crate
2025-03-28 22:32:49 +01:00
Sylvestre Ledru
a0179ea239 uutests: adjust the tests to use them 2025-03-28 21:40:31 +01:00
cerdelen
8c8beb96e4
echo: fixed double hyphen as argument (#7581)
* Fixes #7558 Added check to only insert addition double hyphen if at start of arguments to correctly prepend addition hyphens for clap as well as additional test case

* additional comment

* fixes issue where flags precedes "--" as arguments
2025-03-28 13:31:48 +01:00
Daniel Hofstetter
d8d635d014 echo: add support for POSIXLY_CORRECT 2025-01-06 09:51:41 +01:00
Daniel Hofstetter
90465357e2 echo: handle double hyphens 2024-12-24 17:01:45 +01:00
Daniel Hofstetter
2c2f5f14a4 echo: use succeeds() to simplify some tests 2024-12-24 16:03:00 +01:00
Daniel Hofstetter
b0fa702e90 echo: remove unnecessary no_stderr() call in test 2024-10-22 14:32:20 +02:00
Andrew Liebenow
66f11c4ce4
echo: handle multibyte escape sequences (#6803)
* echo: handle multibyte escape sequences

Bug was reported, with root cause analysis, by kkew3
Added tests were derived from test cases provided by kkew3
See https://github.com/uutils/coreutils/issues/6741

* Use concrete type

* Fix MSRV issue

* Fix non-UTF-8 argument handling

* Fix MSRV issue

* Fix Clippy violation

* Fix compiler warning

* Address PR comments

* Add MSRV TODO comments

* echo: use stdout_only_bytes instead of stdout_is_bytes

---------

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2024-10-22 11:03:08 +02:00
Terts Diepraam
1b324da436 echo: do not infer long args 2024-01-29 17:40:22 +01:00
Terts Diepraam
191eb9ac12 echo: make -e and -E override each other 2023-12-11 10:53:55 +01:00
Daniel Hofstetter
c29bcb219f echo: don't output "\n" if "\c" is encountered 2023-10-03 14:37:15 +02:00
Terts Diepraam
45487d47b8 extract Base enum 2023-09-25 12:02:45 +02:00
Terts Diepraam
1ad10dd371 echo: add support for \NNN octal escape sequence 2023-08-29 21:54:19 +02:00
Terts Diepraam
4623575a66 echo: fix wrapping behavior of octal sequences 2023-08-28 23:21:39 +02:00
Sylvestre Ledru
bfca6bf70f Add license headers on all files 2023-08-21 10:49:27 +02:00
Daniel Hofstetter
6988eb7ec6 tests: expand wildcard imports 2023-03-20 15:32:35 +01:00
Daniel Hofstetter
f6b646e4e5 clippy: fix warnings introduced with Rust 1.67.0 2023-01-27 17:37:56 +01:00
Zachary Dremann
d6a0b3c920 Allow echo with escapes to work with \0
Testing with gecho on macos outputs a nul character for a \0
2022-01-30 17:24:29 -05:00
Roy Ivy III
3f35e0a421 refactor ~ cargo make format 2021-05-31 08:23:58 -05:00
Roy Ivy III
4e20dedf58 tests ~ refactor/polish spelling (comments, names, and exceptions) 2021-05-31 08:23:57 -05:00
Sylvestre Ledru
c5b43c0994 rustfmt the recent change 2021-04-17 13:21:30 +02:00
Gilad Naaman
81d42aa2b3 Fix some tests to not use CmdResult fields 2021-04-10 23:30:50 +03:00
Yagiz Degirmenci
5e2e2e8ab6
echo: allow leading hyphens (#1887)
* fix: use settings to allow leading hyphen and trailing var arg

fixes: https://github.com/uutils/coreutils/issues/1873

* test: add test cases

* test: add more test cases with different order in hyphen values

* chore: add comment to explain why we need TrailingVarArg
2021-03-23 09:40:05 +01:00
Roy Ivy III
de0375f909 tests ~ reorganize tests 2020-06-01 18:30:04 -05:00
Renamed from tests/test_echo.rs (Browse further)