From f9512e5a90ca52dbc12bd967fc4a6341bcb95e08 Mon Sep 17 00:00:00 2001 From: Thomas Queiroz Date: Mon, 25 Oct 2021 14:45:29 -0300 Subject: [PATCH] tests/env: add empty name test --- tests/by-util/test_env.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/by-util/test_env.rs b/tests/by-util/test_env.rs index 1d76c433d..ecb215f8c 100644 --- a/tests/by-util/test_env.rs +++ b/tests/by-util/test_env.rs @@ -108,6 +108,15 @@ fn test_ignore_environment() { scene.ucmd().arg("-").run().no_stdout(); } +#[test] +fn test_empty_name() { + new_ucmd!() + .arg("-i") + .arg("=xyz") + .run() + .stderr_only("env: warning: no name specified for value 'xyz'"); +} + #[test] fn test_null_delimiter() { let out = new_ucmd!()