summaryrefslogtreecommitdiff
path: root/dotfiles/common/.zsh/modules/Test/A03quoting.ztst
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-01-26 17:36:38 -0600
committerCraig Jennings <c@cjennings.net>2026-01-26 17:36:38 -0600
commitdada2f255daaa2fb493ec8c7d47e2a8123aea494 (patch)
tree0c0eeb84bb7b6e66a2d7f41cdfd061b25f80cc14 /dotfiles/common/.zsh/modules/Test/A03quoting.ztst
parentd50e5955837788fc69b4d5bc74cb574b859ed31a (diff)
refactor(dotfiles): rename system/ to common/ and remove unused configs
Rename dotfiles/system to dotfiles/common for clarity - indicates shared dotfiles used across all desktop environments (DWM, Hyprland). Removed config directories for uninstalled applications: - ghostty (using different terminal) - lf (using ranger instead) - mopidy (using mpd instead) - nitrogen (X11-only, obsolete for Wayland) - pychess (not installed) - JetBrains (not installed via archsetup) - youtube-dl (using yt-dlp with different config location) Kept audacious config for potential future use. Updated all references in archsetup, CLAUDE.md, todo.org, and validation.sh. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'dotfiles/common/.zsh/modules/Test/A03quoting.ztst')
-rw-r--r--dotfiles/common/.zsh/modules/Test/A03quoting.ztst80
1 files changed, 80 insertions, 0 deletions
diff --git a/dotfiles/common/.zsh/modules/Test/A03quoting.ztst b/dotfiles/common/.zsh/modules/Test/A03quoting.ztst
new file mode 100644
index 0000000..da3ce35
--- /dev/null
+++ b/dotfiles/common/.zsh/modules/Test/A03quoting.ztst
@@ -0,0 +1,80 @@
+%test
+ print 'single quotes' "double quotes" `echo backquotes`
+0:Simple use of quotes
+>single quotes double quotes backquotes
+
+ foo=text
+ print -r '$foo\\\' "$foo\$foo\\\"\``echo bar`\`\"" `print -r $foo\\\``
+0:Quoting inside quotes
+>$foo\\\ text$foo\"`bar`" text`
+
+ print -r $'\'ut queant laxis\'\n"resonare fibris"'
+0:$'-style quotes
+>'ut queant laxis'
+>"resonare fibris"
+
+ print -r $'\'a \\\' is \'a backslash\' is \'a \\\''
+0:$'-style quotes with backslashed backslashes
+>'a \' is 'a backslash' is 'a \'
+
+ chars=$(print -r $'BS\\MBS\M-\\')
+ for (( i = 1; i <= $#chars; i++ )); do
+ char=$chars[$i]
+ print $(( [#16] #char ))
+ done
+0:$'-style quote with metafied backslash
+>16#42
+>16#53
+>16#5C
+>16#4D
+>16#42
+>16#53
+>16#DC
+
+ print -r ''''
+ setopt rcquotes
+# We need to set rcquotes here for the next example since it is
+# needed while parsing.
+0:No RC_QUOTES with single quotes
+>
+
+ print -r ''''
+ unsetopt rcquotes
+0:Yes RC_QUOTES with single quotes
+>'
+# ' Deconfuse Emacs quoting rules
+
+ print '<\u0041>'
+ printf '%s\n' $'<\u0042>'
+ print '<\u0043>'
+ printf '%s\n' $'<\u0044>'
+0:\u in both print and printf
+><A>
+><B>
+><C>
+><D>
+
+ null1="$(print -r a$'b\0c'd)"
+ null2="$(setopt posixstrings; print -r a$'b\0c'd)"
+ for string in $null1 $null2; do
+ print ":"
+ for (( i = 1; i <= $#string; i++ )); do
+ char=$string[$i]
+ print $(( [#16] #char ))
+ done
+ done
+0:Embedded null characters in $'...' strings.
+>:
+>16#61
+>16#62
+>16#0
+>16#63
+>16#64
+>:
+>16#61
+>16#62
+>16#64
+
+ () { print $# } '' "" $''
+0:$'' should not be elided, in common with other empty quotes
+>3