Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions tests/picture.bats
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
load test-helper

@test "$clinom picture" {
run "${clicmd}" picture https://treehouses.io/images/OLE_RPi.png
assert_success
}
run "${clicmd}" picture
assert_success && assert_output -p 'Usage:' && assert_output -p 'Views a picture in the terminal.'
}

@test "$clinom picture foo.png (invalid image)" {
run "${clicmd}" picture HasAnyoneReallyBeenFarEvenasDecidedtoUseEvenGoWanttodoLookMoreLike.png
assert_success && assert_output -p "Can't open file (permission?):"
}