From 098fe86ebfb63dbdb8cb061c6913d4d60990cbe8 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sat, 7 Dec 2019 11:02:22 -0800 Subject: [PATCH] Port empty functions test to littlecheck --- tests/checks/empty.fish | 18 ++++++++++++++++++ tests/empty.err | 3 --- tests/empty.in | 16 ---------------- tests/empty.out | 7 ------- 4 files changed, 18 insertions(+), 26 deletions(-) create mode 100644 tests/checks/empty.fish delete mode 100644 tests/empty.err delete mode 100644 tests/empty.in delete mode 100644 tests/empty.out diff --git a/tests/checks/empty.fish b/tests/checks/empty.fish new file mode 100644 index 000000000..c5c598fca --- /dev/null +++ b/tests/checks/empty.fish @@ -0,0 +1,18 @@ +# RUN: %fish %s + +# See issue 5692 + +function empty +end + +# functions should not preserve $status +false; empty; echo $status +# CHECK: 0 +true; empty; echo $status +# CHECK: 0 + +# blocks should preserve $status +false; begin; end; echo $status +# CHECK: 1 +true; begin; end; echo $status +# CHECK: 0 diff --git a/tests/empty.err b/tests/empty.err deleted file mode 100644 index 793c955b5..000000000 --- a/tests/empty.err +++ /dev/null @@ -1,3 +0,0 @@ - -#################### -# Testing `0` after empty functions and blocks diff --git a/tests/empty.in b/tests/empty.in deleted file mode 100644 index f27c24850..000000000 --- a/tests/empty.in +++ /dev/null @@ -1,16 +0,0 @@ -# See issue 5692 - -logmsg "Testing `$status` after empty functions and blocks" - -function empty -end - -# functions shouldn't preserve $status - -false; empty; echo $status # 0 -true; empty; echo $status # 0 - -# blocks should preserve $status - -false; begin; end; echo $status # 1 -true; begin; end; echo $status # 0 diff --git a/tests/empty.out b/tests/empty.out deleted file mode 100644 index 0d0c1d513..000000000 --- a/tests/empty.out +++ /dev/null @@ -1,7 +0,0 @@ - -#################### -# Testing `0` after empty functions and blocks -0 -0 -1 -0