aboutsummaryrefslogtreecommitdiff
path: root/test/functional/helpers.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r--test/functional/helpers.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua
index a6f4f7c2e5..23581ba4d2 100644
--- a/test/functional/helpers.lua
+++ b/test/functional/helpers.lua
@@ -220,9 +220,12 @@ local function execute(...)
end
-- Dedent the given text and write it to the file name.
-local function write_file(name, text)
+local function write_file(name, text, dont_dedent)
local file = io.open(name, 'w')
- file:write(dedent(text))
+ if not dont_dedent then
+ text = dedent(text)
+ end
+ file:write(text)
file:flush()
file:close()
end