diff --git a/test/tw-2189.t b/test/tw-2189.t new file mode 100755 index 000000000..5a23e5583 --- /dev/null +++ b/test/tw-2189.t @@ -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' ]]