tests: Add test for TW-2189

This commit is contained in:
Tomas Babej 2021-08-28 10:39:44 -04:00
parent ddf2f122a2
commit 2619435148

17
test/tw-2189.t Executable file
View file

@ -0,0 +1,17 @@
#!/bin/bash
. bash_tap_tw.sh
task add "foo \' bar"
task list
# Assert the task was correctly added
[[ ! -z `task list | grep "foo ' bar"` ]]
[[ `task _get 1.description` == "foo ' bar" ]]
# Bonus: Assert escaped double quotes are also handled correctly
task add 'foo \" bar'
task list
# Assert the task was correctly added
[[ ! -z `task list | grep 'foo " bar'` ]]
[[ `task _get 2.description` == 'foo " bar' ]]