tree-sitter-dockerfile/corpus/env.txt
2022-09-13 20:27:53 -03:00

142 lines
3.7 KiB
Plaintext

================================================================================
Quoted value
================================================================================
ENV TEST="okay"
--------------------------------------------------------------------------------
(source_file
(env_instruction
(env_pair
name: (unquoted_string)
value: (double_quoted_string))))
================================================================================
Unquoted value
================================================================================
ENV TEST_2=value\ 2
--------------------------------------------------------------------------------
(source_file
(env_instruction
(env_pair
name: (unquoted_string)
value: (unquoted_string))))
=========================================================
Single-letter variable
=========================================================
ENV X=42
---
(source_file
(env_instruction
(env_pair
(unquoted_string)
(unquoted_string))))
================================================================================
keys can begin or end with underscores
================================================================================
ENV _TEST="foo" TEST__=bar
--------------------------------------------------------------------------------
(source_file
(env_instruction
(env_pair
name: (unquoted_string)
value: (double_quoted_string))
(env_pair
name: (unquoted_string)
value: (unquoted_string))))
================================================================================
Multiple
================================================================================
ENV TEST="foo" TEST_2=foo\ bar
--------------------------------------------------------------------------------
(source_file
(env_instruction
(env_pair
name: (unquoted_string)
value: (double_quoted_string))
(env_pair
name: (unquoted_string)
value: (unquoted_string))))
================================================================================
Multiline
================================================================================
ENV TEST1="foo" \
TEST2=bar
--------------------------------------------------------------------------------
(source_file
(env_instruction
(env_pair
name: (unquoted_string)
value: (double_quoted_string))
(line_continuation)
(env_pair
name: (unquoted_string)
value: (unquoted_string))))
================================================================================
Multiple instructions
================================================================================
ENV TEST1="foo"
ENV TEST2="bar"
--------------------------------------------------------------------------------
(source_file
(env_instruction
(env_pair
name: (unquoted_string)
value: (double_quoted_string)))
(env_instruction
(env_pair
name: (unquoted_string)
value: (double_quoted_string))))
================================================================================
Space syntax
================================================================================
ENV TEST1 foo
--------------------------------------------------------------------------------
(source_file
(env_instruction
(env_pair
name: (unquoted_string)
value: (unquoted_string))))
================================================================================
Space syntax 2
================================================================================
ENV TZ America/Toronto
--------------------------------------------------------------------------------
(source_file
(env_instruction
(env_pair
name: (unquoted_string)
value: (unquoted_string))))