From 7be75a02917b40e5791e3f98d177f833a348df35 Mon Sep 17 00:00:00 2001 From: Russ Adams Date: Sat, 3 Oct 2015 10:22:56 -0400 Subject: [PATCH] test: os_system: spec for non-zero exit. #3419 --- test/unit/os/shell_spec.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/unit/os/shell_spec.lua b/test/unit/os/shell_spec.lua index 91123bfd58..20cfc17950 100644 --- a/test/unit/os/shell_spec.lua +++ b/test/unit/os/shell_spec.lua @@ -68,5 +68,10 @@ describe('shell functions', function() eq(input, output) eq(0, status) end) + + it ('returns non-zero exit code', function() + local status, output = os_system('exit 2') + eq(2, status) + end) end) end)