Browse Source

Restored ruby-version after merge, fixed incorrect line endings.

master
Christian Aust 7 months ago
parent
commit
69c549058e
  1. 1
      .ruby-version
  2. 6
      tests/makefile
  3. 16
      tests/tests.bats

1
.ruby-version

@ -0,0 +1 @@
ruby-2.7.2

6
tests/makefile

@ -3,9 +3,9 @@ all: out/writeEnv.txt out/writeVar.txt
out/writeEnv.txt: out/
echo "$$ENV_PASSWORD" > out/writeEnv.txt
out/writeVar.txt: out/
echo "$(VAR_PASSWORD)" > out/writeVar.txt
out/:
mkdir out
mkdir out

16
tests/tests.bats

@ -3,41 +3,41 @@
@test "simple-env-style" {
rm -rf out
env ENV_PASSWORD='hi' make
RESULT="$(cat out/writeEnv.txt)"
RESULT="$(cat out/writeEnv.txt)"
[ "$RESULT" = 'hi' ]
}
@test "complex-env-style" {
rm -rf out
env ENV_PASSWORD='hi$/0' make
RESULT="$(cat out/writeEnv.txt)"
RESULT="$(cat out/writeEnv.txt)"
[ "$RESULT" = 'hi$/0' ]
}
@test "simple-makevar-style" {
rm -rf out
make VAR_PASSWORD='hi'
RESULT="$(cat out/writeVar.txt)"
RESULT="$(cat out/writeVar.txt)"
[ "$RESULT" = 'hi' ]
}
@test "complex-makevar-style" {
rm -rf out
make VAR_PASSWORD='hi$/0'
RESULT="$(cat out/writeVar.txt)"
RESULT="$(cat out/writeVar.txt)"
[ "$RESULT" = 'hi$/0' ]
}
@test "simple-override-style" {
rm -rf out
env VAR_PASSWORD='hi' make -e
RESULT="$(cat out/writeVar.txt)"
RESULT="$(cat out/writeVar.txt)"
[ "$RESULT" = 'hi' ]
}
@test "complex-makevar-style" {
rm -rf out
env VAR_PASSWORD='hi$/0' make -e
RESULT="$(cat out/writeVar.txt)"
env VAR_PASSWORD='hi$/0' make -e
RESULT="$(cat out/writeVar.txt)"
[ "$RESULT" = 'hi$/0' ]
}
}

Loading…
Cancel
Save