Uppercase integration test exported variable names (#183)
For windows, since windows environment variables are not case sensitive.
This commit is contained in:
parent
8d1ef2f54f
commit
a6e1cc8ac5
@ -528,48 +528,48 @@ hello = "c"
|
|||||||
integration_test! {
|
integration_test! {
|
||||||
name: export_success,
|
name: export_success,
|
||||||
justfile: r#"
|
justfile: r#"
|
||||||
export foo = "a"
|
export FOO = "a"
|
||||||
baz = "c"
|
baz = "c"
|
||||||
export bar = "b"
|
export BAR = "b"
|
||||||
export abc = foo + bar + baz
|
export ABC = FOO + BAR + baz
|
||||||
|
|
||||||
wut:
|
wut:
|
||||||
echo $foo $bar $abc
|
echo $FOO $BAR $ABC
|
||||||
"#,
|
"#,
|
||||||
args: (),
|
args: (),
|
||||||
stdout: "a b abc\n",
|
stdout: "a b abc\n",
|
||||||
stderr: "echo $foo $bar $abc\n",
|
stderr: "echo $FOO $BAR $ABC\n",
|
||||||
status: EXIT_SUCCESS,
|
status: EXIT_SUCCESS,
|
||||||
}
|
}
|
||||||
|
|
||||||
integration_test! {
|
integration_test! {
|
||||||
name: export_override,
|
name: export_override,
|
||||||
justfile: r#"
|
justfile: r#"
|
||||||
export foo = "a"
|
export FOO = "a"
|
||||||
baz = "c"
|
baz = "c"
|
||||||
export bar = "b"
|
export BAR = "b"
|
||||||
export abc = foo + "-" + bar + "-" + baz
|
export ABC = FOO + "-" + BAR + "-" + baz
|
||||||
|
|
||||||
wut:
|
wut:
|
||||||
echo $foo $bar $abc
|
echo $FOO $BAR $ABC
|
||||||
"#,
|
"#,
|
||||||
args: ("foo=hello", "--set", "bar", "bye"),
|
args: ("FOO=hello", "--set", "BAR", "bye"),
|
||||||
stdout: "hello bye hello-bye-c\n",
|
stdout: "hello bye hello-bye-c\n",
|
||||||
stderr: "echo $foo $bar $abc\n",
|
stderr: "echo $FOO $BAR $ABC\n",
|
||||||
status: EXIT_SUCCESS,
|
status: EXIT_SUCCESS,
|
||||||
}
|
}
|
||||||
|
|
||||||
integration_test! {
|
integration_test! {
|
||||||
name: outer_shebang,
|
name: outer_shebang,
|
||||||
justfile: r#"#!/lol/wut
|
justfile: r#"#!/lol/wut
|
||||||
export foo = "a"
|
export FOO = "a"
|
||||||
baz = "c"
|
baz = "c"
|
||||||
export bar = "b"
|
export BAR = "b"
|
||||||
export abc = foo + bar + baz
|
export ABC = FOO + BAR + baz
|
||||||
|
|
||||||
wut:
|
wut:
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
echo $foo $bar $abc
|
echo $FOO $BAR $ABC
|
||||||
"#,
|
"#,
|
||||||
args: (),
|
args: (),
|
||||||
stdout: "",
|
stdout: "",
|
||||||
@ -585,14 +585,14 @@ wut:
|
|||||||
integration_test! {
|
integration_test! {
|
||||||
name: export_shebang,
|
name: export_shebang,
|
||||||
justfile: r#"
|
justfile: r#"
|
||||||
export foo = "a"
|
export FOO = "a"
|
||||||
baz = "c"
|
baz = "c"
|
||||||
export bar = "b"
|
export BAR = "b"
|
||||||
export abc = foo + bar + baz
|
export ABC = FOO + BAR + baz
|
||||||
|
|
||||||
wut:
|
wut:
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
echo $foo $bar $abc
|
echo $FOO $BAR $ABC
|
||||||
"#,
|
"#,
|
||||||
args: (),
|
args: (),
|
||||||
stdout: "a b abc\n",
|
stdout: "a b abc\n",
|
||||||
@ -603,10 +603,10 @@ wut:
|
|||||||
integration_test! {
|
integration_test! {
|
||||||
name: export_recipe_backtick,
|
name: export_recipe_backtick,
|
||||||
justfile: r#"
|
justfile: r#"
|
||||||
export exported_variable = "A-IS-A"
|
export EXPORTED_VARIABLE = "A-IS-A"
|
||||||
|
|
||||||
recipe:
|
recipe:
|
||||||
echo {{`echo recipe $exported_variable`}}
|
echo {{`echo recipe $EXPORTED_VARIABLE`}}
|
||||||
"#,
|
"#,
|
||||||
args: (),
|
args: (),
|
||||||
stdout: "recipe A-IS-A\n",
|
stdout: "recipe A-IS-A\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user