mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-10-03 16:51:29 +00:00
tests: properly set exit code.
This commit is contained in:
@@ -32,6 +32,9 @@ test_get_process_name() {
|
|||||||
|
|
||||||
|
|
||||||
printf "%s\\n" "Test MISC functions."
|
printf "%s\\n" "Test MISC functions."
|
||||||
|
|
||||||
test_convert_time
|
test_convert_time
|
||||||
test_get_ppid
|
test_get_ppid
|
||||||
test_get_process_name
|
test_get_process_name
|
||||||
|
|
||||||
|
[[ -f /tmp/err ]] || exit 0 && { rm /tmp/err; exit 1; }
|
||||||
|
@@ -7,4 +7,5 @@ assert_equals() {
|
|||||||
local status
|
local status
|
||||||
[[ "$1" == "$2" ]] && status="✔"
|
[[ "$1" == "$2" ]] && status="✔"
|
||||||
printf "%s\\n" " ${status:-✖} : ${FUNCNAME[1]}"
|
printf "%s\\n" " ${status:-✖} : ${FUNCNAME[1]}"
|
||||||
|
[[ "$1" == "$2" ]] || { :>/tmp/err; return 1; } && return 0
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user