Add -n option to prevent newline after emoji (#12)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

Adds another commandline option `-n` to the application which prevents
newlines from being added at the end of each output.
Disabled by default.

Co-authored-by: Marty Oehme <marty.oehme@gmail.com>
This commit is contained in:
Yann Büchau 2022-09-27 21:01:44 +02:00 committed by GitHub
parent ec9020150c
commit d03068dba7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 40 additions and 4 deletions

View file

@ -63,3 +63,15 @@ typing result"
BEMOJI_DEFAULT_CMD="echo my custom command" BEMOJI_CLIP_CMD="echo my clipping" run bemoji -c 3>&-
assert_output "my clipping"
}
@test "Prints output with newline by default" {
bats_require_minimum_version 1.5.0
BEMOJI_PICKER_CMD="echo heart" run --keep-empty-lines -- bemoji -e
assert_output --regexp '^heart\n$'
}
@test "Prints output without newline on -n option" {
bats_require_minimum_version 1.5.0
BEMOJI_PICKER_CMD="echo heart" run --keep-empty-lines -- bemoji -ne
assert_output --regexp '^heart$'
}