From 0d3a5dadea25961e625c75d59b983cb740f4413b Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Thu, 17 Sep 2015 20:01:46 +0000 Subject: [PATCH] tests: Add test for escape sequences in double-quoted strings --- highlighters/main/test-data/double-quoted.zsh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/highlighters/main/test-data/double-quoted.zsh b/highlighters/main/test-data/double-quoted.zsh index b200af0..936efa3 100644 --- a/highlighters/main/test-data/double-quoted.zsh +++ b/highlighters/main/test-data/double-quoted.zsh @@ -28,10 +28,19 @@ # vim: ft=zsh sw=2 ts=2 et # ------------------------------------------------------------------------------------------------- -BUFFER=': "foo$bar"' +BUFFER=': "foo$bar:\`:\":\$:' +BUFFER+=\\\':\" expected_region_highlight=( "3 6 $ZSH_HIGHLIGHT_STYLES[double-quoted-argument]" # "foo "7 10 $ZSH_HIGHLIGHT_STYLES[dollar-double-quoted-argument]" # $bar - "11 11 $ZSH_HIGHLIGHT_STYLES[double-quoted-argument]" # " + "11 11 $ZSH_HIGHLIGHT_STYLES[double-quoted-argument]" # : + "12 13 $ZSH_HIGHLIGHT_STYLES[back-double-quoted-argument]" # \` + "14 14 $ZSH_HIGHLIGHT_STYLES[double-quoted-argument]" # : + "15 16 $ZSH_HIGHLIGHT_STYLES[back-double-quoted-argument]" # \$ + "17 17 $ZSH_HIGHLIGHT_STYLES[double-quoted-argument]" # : + "18 19 $ZSH_HIGHLIGHT_STYLES[back-double-quoted-argument]" # \" + "20 20 $ZSH_HIGHLIGHT_STYLES[double-quoted-argument]" # : + "21 22 $ZSH_HIGHLIGHT_STYLES[back-double-quoted-argument]" # \' + "23 24 $ZSH_HIGHLIGHT_STYLES[double-quoted-argument]" # :" )