mirror of
https://github.com/danog/liquid.git
synced 2024-11-26 22:24: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
|
stdin = os.Stdin
|
||||||
buf = &bytes.Buffer{}
|
buf = &bytes.Buffer{}
|
||||||
stdout = buf
|
stdout = buf
|
||||||
os.Args = []string{"liquid", "testdata/source.txt"}
|
os.Args = []string{"liquid", "testdata/source.liquid"}
|
||||||
main()
|
main()
|
||||||
require.Contains(t, buf.String(), "file system")
|
require.Contains(t, buf.String(), "file system")
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ func TestMain(t *testing.T) {
|
|||||||
exitCode := 0
|
exitCode := 0
|
||||||
exit = func(n int) { exitCalled = true; exitCode = n }
|
exit = func(n int) { exitCalled = true; exitCode = n }
|
||||||
|
|
||||||
os.Args = []string{"liquid", "testdata/source.txt"}
|
os.Args = []string{"liquid", "testdata/source.liquid"}
|
||||||
main()
|
main()
|
||||||
require.Equal(t, 0, exitCode)
|
require.Equal(t, 0, exitCode)
|
||||||
|
|
||||||
@ -104,7 +104,7 @@ func TestMain(t *testing.T) {
|
|||||||
require.Contains(t, buf.String(), "defined")
|
require.Contains(t, buf.String(), "defined")
|
||||||
|
|
||||||
// multiple args
|
// multiple args
|
||||||
os.Args = []string{"liquid", "testdata/source.txt", "file2"}
|
os.Args = []string{"liquid", "testdata/source.liquid", "file2"}
|
||||||
buf = &bytes.Buffer{}
|
buf = &bytes.Buffer{}
|
||||||
stderr = buf
|
stderr = buf
|
||||||
main()
|
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