mirror of
https://github.com/casey/just.git
synced 2024-11-26 23:27:26 +03:00
Use unlikely-to-be-set variable name in env tests (#1882)
This commit is contained in:
parent
d55b5c2bdd
commit
0842784281
@ -68,7 +68,7 @@ fn path_not_found() {
|
|||||||
.justfile(
|
.justfile(
|
||||||
"
|
"
|
||||||
foo:
|
foo:
|
||||||
echo $NAME
|
echo $JUST_TEST_VARIABLE
|
||||||
",
|
",
|
||||||
)
|
)
|
||||||
.args(["--dotenv-path", ".env.prod"])
|
.args(["--dotenv-path", ".env.prod"])
|
||||||
@ -88,12 +88,12 @@ fn path_resolves() {
|
|||||||
.justfile(
|
.justfile(
|
||||||
"
|
"
|
||||||
foo:
|
foo:
|
||||||
@echo $NAME
|
@echo $JUST_TEST_VARIABLE
|
||||||
",
|
",
|
||||||
)
|
)
|
||||||
.tree(tree! {
|
.tree(tree! {
|
||||||
subdir: {
|
subdir: {
|
||||||
".env": "NAME=bar"
|
".env": "JUST_TEST_VARIABLE=bar"
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.args(["--dotenv-path", "subdir/.env"])
|
.args(["--dotenv-path", "subdir/.env"])
|
||||||
@ -108,11 +108,11 @@ fn filename_resolves() {
|
|||||||
.justfile(
|
.justfile(
|
||||||
"
|
"
|
||||||
foo:
|
foo:
|
||||||
@echo $NAME
|
@echo $JUST_TEST_VARIABLE
|
||||||
",
|
",
|
||||||
)
|
)
|
||||||
.tree(tree! {
|
.tree(tree! {
|
||||||
".env.special": "NAME=bar"
|
".env.special": "JUST_TEST_VARIABLE=bar"
|
||||||
})
|
})
|
||||||
.args(["--dotenv-filename", ".env.special"])
|
.args(["--dotenv-filename", ".env.special"])
|
||||||
.stdout("bar\n")
|
.stdout("bar\n")
|
||||||
@ -128,11 +128,11 @@ fn filename_flag_overwrites_no_load() {
|
|||||||
set dotenv-load := false
|
set dotenv-load := false
|
||||||
|
|
||||||
foo:
|
foo:
|
||||||
@echo $NAME
|
@echo $JUST_TEST_VARIABLE
|
||||||
",
|
",
|
||||||
)
|
)
|
||||||
.tree(tree! {
|
.tree(tree! {
|
||||||
".env.special": "NAME=bar"
|
".env.special": "JUST_TEST_VARIABLE=bar"
|
||||||
})
|
})
|
||||||
.args(["--dotenv-filename", ".env.special"])
|
.args(["--dotenv-filename", ".env.special"])
|
||||||
.stdout("bar\n")
|
.stdout("bar\n")
|
||||||
@ -148,12 +148,12 @@ fn path_flag_overwrites_no_load() {
|
|||||||
set dotenv-load := false
|
set dotenv-load := false
|
||||||
|
|
||||||
foo:
|
foo:
|
||||||
@echo $NAME
|
@echo $JUST_TEST_VARIABLE
|
||||||
",
|
",
|
||||||
)
|
)
|
||||||
.tree(tree! {
|
.tree(tree! {
|
||||||
subdir: {
|
subdir: {
|
||||||
".env": "NAME=bar"
|
".env": "JUST_TEST_VARIABLE=bar"
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.args(["--dotenv-path", "subdir/.env"])
|
.args(["--dotenv-path", "subdir/.env"])
|
||||||
@ -170,11 +170,11 @@ fn can_set_dotenv_filename_from_justfile() {
|
|||||||
set dotenv-filename := ".env.special"
|
set dotenv-filename := ".env.special"
|
||||||
|
|
||||||
foo:
|
foo:
|
||||||
@echo $NAME
|
@echo $JUST_TEST_VARIABLE
|
||||||
"#,
|
"#,
|
||||||
)
|
)
|
||||||
.tree(tree! {
|
.tree(tree! {
|
||||||
".env.special": "NAME=bar"
|
".env.special": "JUST_TEST_VARIABLE=bar"
|
||||||
})
|
})
|
||||||
.stdout("bar\n")
|
.stdout("bar\n")
|
||||||
.status(EXIT_SUCCESS)
|
.status(EXIT_SUCCESS)
|
||||||
@ -189,12 +189,12 @@ fn can_set_dotenv_path_from_justfile() {
|
|||||||
set dotenv-path:= "subdir/.env"
|
set dotenv-path:= "subdir/.env"
|
||||||
|
|
||||||
foo:
|
foo:
|
||||||
@echo $NAME
|
@echo $JUST_TEST_VARIABLE
|
||||||
"#,
|
"#,
|
||||||
)
|
)
|
||||||
.tree(tree! {
|
.tree(tree! {
|
||||||
subdir: {
|
subdir: {
|
||||||
".env": "NAME=bar"
|
".env": "JUST_TEST_VARIABLE=bar"
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.stdout("bar\n")
|
.stdout("bar\n")
|
||||||
@ -210,12 +210,12 @@ fn program_argument_has_priority_for_dotenv_filename() {
|
|||||||
set dotenv-filename := ".env.special"
|
set dotenv-filename := ".env.special"
|
||||||
|
|
||||||
foo:
|
foo:
|
||||||
@echo $NAME
|
@echo $JUST_TEST_VARIABLE
|
||||||
"#,
|
"#,
|
||||||
)
|
)
|
||||||
.tree(tree! {
|
.tree(tree! {
|
||||||
".env.special": "NAME=bar",
|
".env.special": "JUST_TEST_VARIABLE=bar",
|
||||||
".env.superspecial": "NAME=baz"
|
".env.superspecial": "JUST_TEST_VARIABLE=baz"
|
||||||
})
|
})
|
||||||
.args(["--dotenv-filename", ".env.superspecial"])
|
.args(["--dotenv-filename", ".env.superspecial"])
|
||||||
.stdout("baz\n")
|
.stdout("baz\n")
|
||||||
@ -231,13 +231,13 @@ fn program_argument_has_priority_for_dotenv_path() {
|
|||||||
set dotenv-path:= "subdir/.env"
|
set dotenv-path:= "subdir/.env"
|
||||||
|
|
||||||
foo:
|
foo:
|
||||||
@echo $NAME
|
@echo $JUST_TEST_VARIABLE
|
||||||
"#,
|
"#,
|
||||||
)
|
)
|
||||||
.tree(tree! {
|
.tree(tree! {
|
||||||
subdir: {
|
subdir: {
|
||||||
".env": "NAME=bar",
|
".env": "JUST_TEST_VARIABLE=bar",
|
||||||
".env.special": "NAME=baz"
|
".env.special": "JUST_TEST_VARIABLE=baz"
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.args(["--dotenv-path", "subdir/.env.special"])
|
.args(["--dotenv-path", "subdir/.env.special"])
|
||||||
|
Loading…
Reference in New Issue
Block a user