1
0
mirror of https://github.com/danog/liquid.git synced 2024-11-26 19:44:45 +01:00

Rename source.txt -> source.liquid; add env.liquid

This commit is contained in:
Oliver Steele 2022-02-12 11:09:51 +08:00
parent ae6b280abe
commit ddc4e45c83
3 changed files with 6 additions and 3 deletions

View File

@ -63,7 +63,7 @@ func TestMain(t *testing.T) {
stdin = os.Stdin
buf = &bytes.Buffer{}
stdout = buf
os.Args = []string{"liquid", "testdata/source.txt"}
os.Args = []string{"liquid", "testdata/source.liquid"}
main()
require.Contains(t, buf.String(), "file system")
@ -72,7 +72,7 @@ func TestMain(t *testing.T) {
exitCode := 0
exit = func(n int) { exitCalled = true; exitCode = n }
os.Args = []string{"liquid", "testdata/source.txt"}
os.Args = []string{"liquid", "testdata/source.liquid"}
main()
require.Equal(t, 0, exitCode)
@ -104,7 +104,7 @@ func TestMain(t *testing.T) {
require.Contains(t, buf.String(), "defined")
// multiple args
os.Args = []string{"liquid", "testdata/source.txt", "file2"}
os.Args = []string{"liquid", "testdata/source.liquid", "file2"}
buf = &bytes.Buffer{}
stderr = buf
main()

3
cmd/liquid/testdata/env.liquid vendored Normal file
View File

@ -0,0 +1,3 @@
PWD={{ PWD }}
HOME={{ HOME }}
USER={{ USER }}