aboutsummaryrefslogtreecommitdiff
path: root/tests/ranking.sh
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-06-06 16:54:35 -0300
committerEuAndreh <eu@euandre.org>2021-06-06 16:54:35 -0300
commit9a9ec634d560b458b216bd1c2a7033c0b7d78339 (patch)
treefd48f29bca2f9f72d5dee07d8be6a5cf48164a2f /tests/ranking.sh
parentTODOs.md: Add #task-19f9d131-696a-3417-c052-6312f04a33af (diff)
downloadremembering-9a9ec634d560b458b216bd1c2a7033c0b7d78339.tar.gz
remembering-9a9ec634d560b458b216bd1c2a7033c0b7d78339.tar.xz
tests/ranking.sh: Add test_utf_commands
Diffstat (limited to 'tests/ranking.sh')
-rwxr-xr-xtests/ranking.sh19
1 files changed, 18 insertions, 1 deletions
diff --git a/tests/ranking.sh b/tests/ranking.sh
index 3b9ac6e..4f7e376 100755
--- a/tests/ranking.sh
+++ b/tests/ranking.sh
@@ -271,7 +271,7 @@ e'
}
test_names_with_spaces() {
- testing 'Names with spaces'
+ testing 'names with spaces'
PROFILE="names-with-spaces-$(uuid)"
INPUT='a b c
d e f'
@@ -299,6 +299,22 @@ test_really_long_list() {
test_ok
}
+test_utf8_commands() {
+ testing 'UTF-8 commands'
+ PROFILE="utf8-commands-$(uuid)"
+ INPUT='❤️
+ŭ 😀'
+ EXPECTED='0:❤️
+0:á
+0:è
+1:ŭ 😀'
+ pick_x 'ŭ 😀' "$INPUT"
+ assert_profile "$PROFILE" "$EXPECTED"
+ test_ok
+}
+
test_picking_first_makes_it_be_always_first
test_promoting_values
test_higher_values_loose_tie
@@ -312,3 +328,4 @@ test_profile_does_not_exist
test_profile_is_empty
test_names_with_spaces
# test_really_long_list
+test_utf8_commands