Commit Graph
14 Commits
Author SHA1 Message Date
Sylvestre Ledru 50085d7a0e printenv: add a test for non-utf-8 var
Like in : 5d4abd88e9
2025-12-25 16:31:25 +01:00
Dorian PéronandGitHub 0bfbbc00c7 Fix printenv non-UTF8 (#9728)
* printenv: Handle invalid UTF-8 encoding in variables

* test(printenv): Add test for non-UTF8 content in variable
2025-12-22 14:12:38 +01:00
SuprunandGitHub 45fd3c9e93 tests/printenv: add more tests (#9151)
* tests/printenv: add more tests

* tests/printenv: use clearer checks in tests
2025-11-06 13:40:23 +01:00
Sylvestre Ledru 4b87d5abca Port printenv translation: fix tests/misc/invalid-opt 2025-08-13 14:15:56 +02:00
Dorian Peron 6e23d4e979 tests: patch tests to simplify imports 2025-07-01 03:36:46 +02:00
Sylvestre Ledru a0179ea239 uutests: adjust the tests to use them 2025-03-28 21:40:31 +01:00
Sylvestre Ledru bfca6bf70f Add license headers on all files 2023-08-21 10:49:27 +02:00
Miles Liu 81a4e8fb7d Remove keep_env from the test framework 2023-03-24 14:25:37 +08:00
Daniel Hofstetter 6988eb7ec6 tests: expand wildcard imports 2023-03-20 15:32:35 +01:00
Joining7943 1c230fd779 tests/util: Refactor UCommand and TestScenario.
Summary of changes in UCommand:
* Extend UCommand by builder methods and simplify methods in TestScenario
* Simplify code structures where possible. Add documentation.
* Store bin_path as PathBuf and util_name as String in all structs
* Remove UCommand::util and make bin_path, temp_dir private
* Rename UCommand::with_limit -> UCommand::limit

Summary of changes in TestScenario:
* Rename some parameters in TestScenario methods to be more descriptive
* Remove ucmd_keepenv, cmd_keepenv from TestScenario. Use UCommand::keep_env instead.
2023-02-18 23:38:20 +01:00
Sylvestre Ledru 9a5d18b8f6 Weird env variable names should trigger an error.
For example `env a=b=c printenv a=b` should fail

Tested by tests/misc/printenv.sh
2022-11-06 17:35:00 +01:00
Sylvestre Ledru ba83e5e901 use assert_eq instead of x == y. Better output in case of error 2022-03-23 10:41:31 +01:00
Gilad Naaman b91fadd8f4 Refactored tests for more utilities 2021-04-18 02:32:43 +03:00
Roy Ivy III de0375f909 tests ~ reorganize tests 2020-06-01 18:30:04 -05:00