diff --git a/tests/test_buffer.zunit b/tests/test_buffer.zunit index 3c59acb..2dd09e7 100644 --- a/tests/test_buffer.zunit +++ b/tests/test_buffer.zunit @@ -38,6 +38,8 @@ } @test 'ysu - _write_ysu_buffer invalid' { + (( $+commands[tput] )) || skip "tput not found" + YSU_MESSAGE_POSITION="invalid" export _YSU_BUFFER diff --git a/tests/test_you_should_use.zunit b/tests/test_you_should_use.zunit index dfe6c32..a07c89b 100644 --- a/tests/test_you_should_use.zunit +++ b/tests/test_you_should_use.zunit @@ -6,6 +6,9 @@ } @test 'ysu version exported' { + (( $+commands[git] )) || skip "git not found" + [ -d ".git" ] || skip "not in git repo" + git_version="$(git tag --list | sort | tail -1)" git tag --list @@ -34,6 +37,8 @@ } @test 'ysu message correct output' { + (( $+commands[tput] )) || skip "tput not found" + unset YSU_MESSAGE_FORMAT run ysu_message "alias" "ls -l" "ll" @@ -46,6 +51,8 @@ } @test 'ysu message correct output 2' { + (( $+commands[tput] )) || skip "tput not found" + unset YSU_MESSAGE_FORMAT run ysu_message "foobar" "2>/dev/null" "NE" @@ -58,6 +65,8 @@ } @test 'escapes \ and % correctly' { + (( $+commands[tput] )) || skip "tput not found" + unset YSU_MESSAGE_FORMAT run ysu_message "alias" "printf '%s\\n'" "pf"