From e50c19f284dad6b4b7b79f91cc8576a97626be8a Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Fri, 16 Dec 2022 15:32:04 -0500 Subject: tests: Turn on set -e --- tests/bfs/help.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'tests/bfs/help.sh') diff --git a/tests/bfs/help.sh b/tests/bfs/help.sh index 5e5c684..2c0b28a 100644 --- a/tests/bfs/help.sh +++ b/tests/bfs/help.sh @@ -1,6 +1,4 @@ -invoke_bfs -help | grep -E '\{...?\}' && return 1 -invoke_bfs -D help | grep -E '\{...?\}' && return 1 -invoke_bfs -S help | grep -E '\{...?\}' && return 1 -invoke_bfs -regextype help | grep -E '\{...?\}' && return 1 - -return 0 +! invoke_bfs -help | grep -E '\{...?\}' +! invoke_bfs -D help | grep -E '\{...?\}' +! invoke_bfs -S help | grep -E '\{...?\}' +! invoke_bfs -regextype help | grep -E '\{...?\}' -- cgit v1.2.3 From 8c06e033483215e5148bc803b61207b99d458a48 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Mon, 23 Oct 2023 13:34:33 -0400 Subject: tests/bfs/help: Use ... && fail instead of ! ... ! false doesn't trigger an error with set -e. --- tests/bfs/help.sh | 8 ++++---- tests/bsd/f_incomplete.sh | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'tests/bfs/help.sh') diff --git a/tests/bfs/help.sh b/tests/bfs/help.sh index 2c0b28a..ec53867 100644 --- a/tests/bfs/help.sh +++ b/tests/bfs/help.sh @@ -1,4 +1,4 @@ -! invoke_bfs -help | grep -E '\{...?\}' -! invoke_bfs -D help | grep -E '\{...?\}' -! invoke_bfs -S help | grep -E '\{...?\}' -! invoke_bfs -regextype help | grep -E '\{...?\}' +invoke_bfs -help | grep -E '\{...?\}' && fail +invoke_bfs -D help | grep -E '\{...?\}' && fail +invoke_bfs -S help | grep -E '\{...?\}' && fail +invoke_bfs -regextype help | grep -E '\{...?\}' && fail diff --git a/tests/bsd/f_incomplete.sh b/tests/bsd/f_incomplete.sh index 50afe42..0dfb19f 100644 --- a/tests/bsd/f_incomplete.sh +++ b/tests/bsd/f_incomplete.sh @@ -1,2 +1 @@ ! invoke_bfs -f - -- cgit v1.2.3 From e1390e21d6fcfa97838bdaff968d9cfb26261065 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Mon, 23 Oct 2023 13:46:52 -0400 Subject: tests/bfs/help: Fix exit status --- tests/bfs/help.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/bfs/help.sh') diff --git a/tests/bfs/help.sh b/tests/bfs/help.sh index ec53867..5029c7e 100644 --- a/tests/bfs/help.sh +++ b/tests/bfs/help.sh @@ -1,4 +1,4 @@ -invoke_bfs -help | grep -E '\{...?\}' && fail -invoke_bfs -D help | grep -E '\{...?\}' && fail -invoke_bfs -S help | grep -E '\{...?\}' && fail -invoke_bfs -regextype help | grep -E '\{...?\}' && fail +! invoke_bfs -help | grep -E '\{...?\}' || fail +! invoke_bfs -D help | grep -E '\{...?\}' || fail +! invoke_bfs -S help | grep -E '\{...?\}' || fail +! invoke_bfs -regextype help | grep -E '\{...?\}' || fail -- cgit v1.2.3