e2etests-cli: Add sketch test
This commit is contained in:
parent
eae8fdeb29
commit
90c84ea6f6
3 changed files with 11 additions and 1 deletions
|
|
@ -33,7 +33,17 @@ func TestCLI_E2E(t *testing.T) {
|
||||||
name: "hello_world_png_pad",
|
name: "hello_world_png_pad",
|
||||||
run: func(t *testing.T, ctx context.Context, dir string, env *xos.Env) {
|
run: func(t *testing.T, ctx context.Context, dir string, env *xos.Env) {
|
||||||
writeFile(t, dir, "hello-world.d2", `x -> y`)
|
writeFile(t, dir, "hello-world.d2", `x -> y`)
|
||||||
err := runTestMain(t, ctx, dir, env, "-pad 4000", "hello-world.d2", "hello-world.png")
|
err := runTestMain(t, ctx, dir, env, "--pad=400", "hello-world.d2", "hello-world.png")
|
||||||
|
assert.Success(t, err)
|
||||||
|
png := readFile(t, dir, "hello-world.png")
|
||||||
|
assert.Testdata(t, ".png", png)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "hello_world_png_sketch",
|
||||||
|
run: func(t *testing.T, ctx context.Context, dir string, env *xos.Env) {
|
||||||
|
writeFile(t, dir, "hello-world.d2", `x -> y`)
|
||||||
|
err := runTestMain(t, ctx, dir, env, "--sketch", "hello-world.d2", "hello-world.png")
|
||||||
assert.Success(t, err)
|
assert.Success(t, err)
|
||||||
png := readFile(t, dir, "hello-world.png")
|
png := readFile(t, dir, "hello-world.png")
|
||||||
assert.Testdata(t, ".png", png)
|
assert.Testdata(t, ".png", png)
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 72 KiB |
BIN
e2etests-cli/testdata/TestCLI_E2E/hello_world_png_sketch.exp.png
vendored
Normal file
BIN
e2etests-cli/testdata/TestCLI_E2E/hello_world_png_sketch.exp.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 28 KiB |
Loading…
Reference in a new issue