From 1c8919092ef82d8319c21368b3ab432c3d8544e1 Mon Sep 17 00:00:00 2001 From: LemonBoy Date: Thu, 14 Feb 2019 11:32:00 +0100 Subject: [PATCH] Warn the user if no tests are found Fixes #558 --- src/nimble.nim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/nimble.nim b/src/nimble.nim index f1f3e9d..f488e2c 100644 --- a/src/nimble.nim +++ b/src/nimble.nim @@ -1016,6 +1016,11 @@ proc test(options: Options) = ## Executes all tests starting with 't' in the ``tests`` directory. ## Subdirectories are not walked. var files = toSeq(walkDir(getCurrentDir() / "tests")) + + if files.len < 1: + display("Warning:", "No tests found!", Warning, HighPriority) + return + files.sort((a, b) => cmp(a.path, b.path)) for file in files: