File: tw-2189.test.sh

package info (click to toggle)
task 3.4.2%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 7,332 kB
  • sloc: cpp: 42,567; python: 12,689; sh: 775; perl: 189; makefile: 35
file content (17 lines) | stat: -rwxr-xr-x 424 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env 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' ]]