From f3fa0f56b7886ae18b8a629dd092b4a60331d420 Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Tue, 3 Sep 2019 22:47:30 +0300
Subject: [PATCH] Add test for changing a file in-place.

---
 tests/templates.bats | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tests/templates.bats b/tests/templates.bats
index b5c3dfc..a9647d2 100644
--- a/tests/templates.bats
+++ b/tests/templates.bats
@@ -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" ]
+}
-- 
GitLab