From 2619435148089ad4da6c2c27828b0fc792d6b85e Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Sat, 28 Aug 2021 10:39:44 -0400 Subject: [PATCH] tests: Add test for TW-2189 --- test/tw-2189.t | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 test/tw-2189.t 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' ]]