Commit f3fa0f56 authored by nimrod's avatar nimrod
Browse files

Add test for changing a file in-place.

parent 27cbbe0a
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -12,3 +12,10 @@ export name='John'
    run cat "$BATS_TMPDIR/output"
    [ "$output" = "John" ]
}

@test "Render file in-place" {
    cp "$BATS_TEST_DIRNAME/input" "$BATS_TMPDIR/inplace"
    template --output "$BATS_TMPDIR/inplace" "$BATS_TMPDIR/inplace"
    run cat "$BATS_TMPDIR/inplace"
    [ "$output" = "John" ]
}