Skip to content

Commit

Permalink
Tweak test
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Aug 10, 2023
1 parent 83923c4 commit 6e56711
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/fixtures/reference/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ browser = "chromium" # browser to use with `cargo doc --open`,

[env]
# Set ENV_VAR_NAME=value for any process run by Cargo
ENV_VAR_NAME = "value"
ENV_VAR_NAME = { value = "value", force = true }
# Set even if already present in environment
ENV_VAR_NAME_2 = { value = "value", force = true }
ENV_VAR_NAME_2 = "value"
# Value is relative to .cargo directory containing `config.toml`, make absolute
ENV_VAR_NAME_3 = { value = "relative/path", relative = true }

Expand Down
4 changes: 2 additions & 2 deletions tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ fn assert_reference_example(de: fn(&Path, ResolveOptions) -> Result<Config>) ->

// [env]
assert_eq!(config.env["ENV_VAR_NAME"].value, "value");
assert_eq!(config.env["ENV_VAR_NAME"].force, false);
assert_eq!(config.env["ENV_VAR_NAME"].force, true);
assert_eq!(config.env["ENV_VAR_NAME"].relative, false);
assert_eq!(config.env["ENV_VAR_NAME_2"].value, "value");
assert_eq!(config.env["ENV_VAR_NAME_2"].force, true);
assert_eq!(config.env["ENV_VAR_NAME_2"].force, false);
assert_eq!(config.env["ENV_VAR_NAME_2"].relative, false);
assert_eq!(config.env["ENV_VAR_NAME_3"].value, dir.join("relative/path"));
assert_eq!(config.env["ENV_VAR_NAME_3"].force, false);
Expand Down

0 comments on commit 6e56711

Please sign in to comment.