Skip to content

Commit

Permalink
Issue #76: add some tests to ensure that GStrings work as expected wh…
Browse files Browse the repository at this point in the history
…en declaring environment variables.
  • Loading branch information
bsautel committed Apr 5, 2020
1 parent 32c2eef commit bb4941c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class NodeTask_integTest
then:
result6.task(":nodeSetup").outcome == TaskOutcome.UP_TO_DATE
result6.task(":env").outcome == TaskOutcome.SUCCESS
result6.output.contains("Detected custom environment: custom environment value")
result6.output.contains("Detected custom environment: custom value")

when:
environmentVariables.set("NEW_ENV_VARIABLE", "Let's make the whole environment change")
Expand Down
3 changes: 2 additions & 1 deletion src/test/resources/fixtures/node-env/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ if (changeOptions) {
}

if (changeEnv) {
env.environment = ["CUSTOM": "custom environment value"]
def qualifier = "custom"
env.environment = [CUSTOM: "${qualifier} value"]
}

if (changeWorkingDir) {
Expand Down
3 changes: 2 additions & 1 deletion src/test/resources/fixtures/npm-env/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ task version(type: NpmTask) {
}

if (isPropertyEnabled("customEnv")) {
env.environment = [CUSTOM: "custom value"]
def qualifier = "custom"
env.environment = [CUSTOM: "${qualifier} value"]
}

if (isPropertyEnabled("ignoreExitValue")) {
Expand Down
3 changes: 2 additions & 1 deletion src/test/resources/fixtures/npx-env/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ task version(type: NpxTask) {
}

if (isPropertyEnabled("customEnv")) {
env.environment = [CUSTOM: "custom value"]
def qualifier = "custom"
env.environment = [CUSTOM: "${qualifier} value"]
}

if (isPropertyEnabled("ignoreExitValue")) {
Expand Down
3 changes: 2 additions & 1 deletion src/test/resources/fixtures/yarn-env/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ task version(type: YarnTask) {
}

if (isPropertyEnabled("customEnv")) {
env.environment = [CUSTOM: "custom value"]
def qualifier = "custom"
env.environment = [CUSTOM: "${qualifier} value"]
}

if (isPropertyEnabled("ignoreExitValue")) {
Expand Down

0 comments on commit bb4941c

Please sign in to comment.