From 5e72840336c03ef66557f96623fedddece53083d Mon Sep 17 00:00:00 2001 From: liquid600pgm Date: Sat, 22 Jun 2019 01:17:41 +0200 Subject: [PATCH] Test for the #581 fix --- tests/tester.nim | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/tester.nim b/tests/tester.nim index bd7a306..fcd4752 100644 --- a/tests/tester.nim +++ b/tests/tester.nim @@ -818,3 +818,12 @@ suite "Module tests": test "cli": cd "..": check execCmdEx("nim c -r src/nimblepkg/cli").exitCode == QuitSuccess + +test "init does not overwrite existing files (#581)": + createDir("issue581/src") + cd "issue581": + const Src = "echo \"OK\"" + writeFile("src/issue581.nim", Src) + check execNimbleYes("init").exitCode == QuitSuccess + check readFile("src/issue581.nim") == Src + removeDir("issue581")