From 59cd409517012b9bfe4e97668dae93ed671f12ec Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sun, 25 Dec 2016 14:46:57 +0100 Subject: [PATCH] Small cleanup to test-spawn.lua This removes a duplicate test and moves some "spawn with empty string as argument" up to the long list of similar tests (and adds error checking). I do not see the point of the assert(#client.get() == 0) and so it was just dropped. Signed-off-by: Uli Schlachter --- tests/test-spawn.lua | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/tests/test-spawn.lua b/tests/test-spawn.lua index b06249a0..8782fb9c 100644 --- a/tests/test-spawn.lua +++ b/tests/test-spawn.lua @@ -29,6 +29,9 @@ local steps = { error_message = spawn(" ") assert(string.find(error_message, 'Text was empty'), error_message) + error_message = spawn("") + assert(string.find(error_message, 'Text was empty'), error_message) + error_message = spawn{} assert(string.find(error_message, 'There is nothing to execute'), error_message) @@ -90,17 +93,6 @@ local steps = { return true end end, - function() - -- Test empty command table - spawn{} - return true - end, - function() - -- Test empty command string - spawn("") - assert(#client.get() == 0) - return true - end, } runner.run_steps(steps)