mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
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
This commit is contained in:
parent
9ce788632b
commit
9a5d18b8f6
2 changed files with 17 additions and 3 deletions
|
@ -28,3 +28,12 @@ fn test_get_var() {
|
|||
assert!(!result.stdout_str().is_empty());
|
||||
assert_eq!(result.stdout_str().trim(), "VALUE");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_ignore_equal_var() {
|
||||
let scene = TestScenario::new(util_name!());
|
||||
// tested by gnu/tests/misc/printenv.sh
|
||||
let result = scene.ucmd().env("a=b", "c").arg("a=b").fails();
|
||||
|
||||
assert!(result.stdout_str().is_empty());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue