mirror of
https://github.com/danog/liquid.git
synced 2024-11-26 22:14:39 +01:00
Rename source.txt -> source.liquid; add env.liquid
This commit is contained in:
parent
ae6b280abe
commit
ddc4e45c83
@ -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
3
cmd/liquid/testdata/env.liquid
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
PWD={{ PWD }}
|
||||
HOME={{ HOME }}
|
||||
USER={{ USER }}
|
Loading…
Reference in New Issue
Block a user