deno.land / std@0.224.0 / dotenv / testdata / .env.expand.test

.env.expand.test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
THE_ANSWER=42
QUOTED_SINGLE='single quoted'
QUOTED_DOUBLE="double quoted"
EXPAND_VAR=$THE_ANSWER
EXPAND_TWO_VARS=$QUOTED_SINGLE!==$QUOTED_DOUBLE
EXPAND_RECURSIVE=$EXPAND_TWO_VARS
EXPAND_DEFAULT_TRUE=$NO_SUCH_VAR:-default
EXPAND_DEFAULT_FALSE=$THE_ANSWER:-default
EXPAND_DEFAULT_VAR=$NO_SUCH_VAR:-$THE_ANSWER:-default
EXPAND_DEFAULT_VAR_RECURSIVE=$NO_SUCH_VAR:-$EXPAND_TWO_VARS:-default
EXPAND_DEFAULT_VAR_DEFAULT=$NO_SUCH_VAR:-$NO_SUCH_VAR:-default
EXPAND_DEFAULT_WITH_SPECIAL_CHARACTERS=$UNDEFINED_ENV_KEY:-/default/path
EXPAND_VAR_IN_BRACKETS=${THE_ANSWER}
EXPAND_TWO_VARS_IN_BRACKETS=${QUOTED_SINGLE}!==${QUOTED_DOUBLE}
EXPAND_RECURSIVE_VAR_IN_BRACKETS=${EXPAND_TWO_VARS_IN_BRACKETS}
EXPAND_DEFAULT_IN_BRACKETS_TRUE=${NO_SUCH_VAR:-default}
EXPAND_DEFAULT_IN_BRACKETS_FALSE=${THE_ANSWER:-default}
EXPAND_DEFAULT_VAR_IN_BRACKETS=${NO_SUCH_VAR:-${THE_ANSWER:-default}}
EXPAND_DEFAULT_VAR_IN_BRACKETS_RECURSIVE=${NO_SUCH_VAR:-${EXPAND_TWO_VARS:-default}}
EXPAND_DEFAULT_VAR_IN_BRACKETS_DEFAULT=${NO_SUCH_VAR:-${NO_SUCH_VAR:-default}}
EXPAND_DEFAULT_IN_BRACKETS_WITH_SPECIAL_CHARACTERS=${UNDEFINED_ENV_KEY:-/default/path}
EXPAND_ESCAPED=\$THE_ANSWER
EXPAND_WITH_DIFFERENT_STYLES=${QUOTED_SINGLE}!==$QUOTED_DOUBLE
std

Version Info

Tagged at
6 months ago