Skip to content

Commit

Permalink
Add new-style test directory
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmc3 committed Jul 17, 2024
1 parent 7b9bdd8 commit eba675e
Show file tree
Hide file tree
Showing 32 changed files with 279 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
*.zwc
*.zwc.old
.cache/
!/tests/**/.cache/
.tmp/
.plugins/
.todo/
Expand Down
Empty file.
2 changes: 2 additions & 0 deletions tests/tmp_home/.cache/antidote/foo/bar/bar.plugin.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
echo "sourcing foo/bar..."
plugins=($plugins foo/bar)
Empty file.
2 changes: 2 additions & 0 deletions tests/tmp_home/.cache/antidote/foo/baz/baz.plugin.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
echo "sourcing foo/baz..."
plugins=($plugins foo/baz)
2 changes: 2 additions & 0 deletions tests/tmp_home/.cache/antidote/foo/baz/functions/_baz
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/zsh
echo _baz completion
5 changes: 5 additions & 0 deletions tests/tmp_home/.cache/antidote/foo/baz/functions/baz
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/zsh
function baz {
echo baz function
}
baz "$@"
Empty file.
2 changes: 2 additions & 0 deletions tests/tmp_home/.cache/antidote/foo/qux/qux.plugin.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
echo "sourcing foo/qux..."
plugins=($plugins foo/qux)
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# fake foo/bar
echo "sourcing romkatv/zsh-defer..."
plugins=($plugins romkatv/zsh-defer)
function zsh-defer {
$@
}
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
echo "sourcing pretty.zsh-theme..."
themes=($themes ohmy:pretty)
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
echo "sourcing ugly.zsh-theme..."
themes=($themes ohmy:ugly)
2 changes: 2 additions & 0 deletions tests/tmp_home/.cache/antidote/ohmy/ohmy/lib/lib1.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
echo "sourcing ohmy/lib/lib1.zsh..."
libs=($libs ohmy:lib1)
2 changes: 2 additions & 0 deletions tests/tmp_home/.cache/antidote/ohmy/ohmy/lib/lib2.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
echo "sourcing ohmy/lib/lib2.zsh..."
libs=($libs ohmy:lib2)
2 changes: 2 additions & 0 deletions tests/tmp_home/.cache/antidote/ohmy/ohmy/lib/lib3.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
echo "sourcing ohmy/lib/lib3.zsh..."
libs=($libs ohmy:lib2)
2 changes: 2 additions & 0 deletions tests/tmp_home/.cache/antidote/ohmy/ohmy/oh-my.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
echo "sourcing oh-my.sh..."
plugins=($plugins ohmy/ohmy)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#compdef
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
echo "sourcing docker.plugin.zsh..."
plugins+=(ohmy:docker)
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
echo "sourcing extract.plugin.zsh..."
plugins+=(ohmy:extract)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/zsh
function macos_func {
echo macos_func "$@"
}
macos_func "$@"
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
echo "sourcing macos.plugin.zsh..."
plugins+=(ohmy:macos)
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
echo "sourcing magic-enter.plugin.zsh..."
plugins+=(ohmy:magic-enter)
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
echo "sourcing pretty.zsh-theme..."
themes=($themes ohmy:pretty)
30 changes: 30 additions & 0 deletions tests/tmp_home/.zsh/.zsh_plugins.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# local plugins
~/foo/bar
$ZDOTDIR/foo/bar
$ZDOTDIR/foo/bar path:baz

# repo plugins
foo/bar
git@github.com:baz/qux.git # trailing comments

# kind:clone
getantidote/zsh-defer kind:clone # more trailing comments

# kind:zsh
foo/bar kind:zsh

# kind:fpath
foo/bar kind:fpath

# kind:path
foo/bar kind:path

# subpath plugins
ohmy/ohmy path:lib
ohmy/ohmy path:plugins/extract

# deferred
ohmy/ohmy path:plugins/magic-enter kind:defer

# theme
ohmy/ohmy path:custom/themes/pretty.zsh-theme
2 changes: 2 additions & 0 deletions tests/tmp_home/.zsh/custom/lib/lib1.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
echo "sourcing custom lib1.zsh..."
libs=($libs custom:lib1)
2 changes: 2 additions & 0 deletions tests/tmp_home/.zsh/custom/lib/lib2.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
echo "sourcing custom lib2.zsh..."
libs=($libs custom:lib2)
187 changes: 187 additions & 0 deletions tests/tmp_home/.zsh/custom/plugins/grizwold/grizwold.plugin.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
() {
setopt interactivecomments
typeset -ga grizwold_zopts=(
noaliases
aliasfuncdef
allexport
noalwayslastprompt
alwaystoend
appendcreate
noappendhistory
autocd
autocontinue
noautolist
noautomenu
autonamedirs
noautoparamkeys
noautoparamslash
autopushd
noautoremoveslash
autoresume
nobadpattern
nobanghist
nobareglobqual
bashautolist
bashrematch
nobeep
nobgnice
braceccl
bsdecho
nocaseglob
nocasematch
cbases
cdablevars
cdsilent
chasedots
chaselinks
nocheckjobs
nocheckrunningjobs
# noclobber
combiningchars
completealiases
completeinword
continueonerror
correct
correctall
cprecedences
cshjunkiehistory
cshjunkieloops
cshjunkiequotes
cshnullcmd
cshnullglob
nodebugbeforecmd
dvorak
emacs
noequals
# errexit
# errreturn
noevallineno
# noexec
extendedglob
extendedhistory
noflowcontrol
# forcefloat
nofunctionargzero
noglob
noglobalexport
# noglobalrcs
globassign
globcomplete
globdots
globstarshort
globsubst
nohashcmds
nohashdirs
hashexecutablesonly
nohashlistall
histallowclobber
nohistbeep
histexpiredupsfirst
histfcntllock
histfindnodups
histignorealldups
histignoredups
histignorespace
histlexwords
histnofunctions
histnostore
histreduceblanks
nohistsavebycopy
histsavenodups
histsubstpattern
histverify
nohup
ignorebraces
ignoreclosebraces
ignoreeof
incappendhistory
incappendhistorytime
# interactive
interactivecomments
# ksharrays
kshautoload
kshglob
# kshoptionprint
kshtypeset
kshzerosubscript
nolistambiguous
nolistbeep
listpacked
listrowsfirst
nolisttypes
localloops
# localoptions
localpatterns
localtraps
# login
longlistjobs
magicequalsubst
mailwarning
markdirs
menucomplete
# monitor
nomultibyte
nomultifuncdef
nomultios
nonomatch
nonotify
nullglob
numericglobsort
octalzeroes
overstrike
pathdirs
pathscript
pipefail
posixaliases
posixargzero
posixbuiltins
posixcd
posixidentifiers
posixjobs
# posixstrings
posixtraps
printeightbit
printexitvalue
# privileged
promptbang
nopromptcr
# nopromptpercent
nopromptsp
promptsubst
pushdignoredups
pushdminus
pushdsilent
pushdtohome
rcexpandparam
rcquotes
# norcs
recexact
rematchpcre
# restricted
rmstarsilent
rmstarwait
sharehistory
shfileexpansion
shglob
# shinstdin
shnullcmd
shoptionletters
noshortloops
shwordsplit
# singlecommand
singlelinezle
# sourcetrace
sunkeyboardhack
transientrprompt
trapsasync
typesetsilent
nounset
# verbose
# vi
warncreateglobal
warnnestedvar
# xtrace
# zle
)
setopt $grizwold_zopts
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# fake foo/bar
echo "sourcing myplugin..."
plugins+=(custom:myplugin)
2 changes: 2 additions & 0 deletions tests/tmp_home/.zsh/custom/plugins/mytheme/mytheme.zsh-theme
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
echo "sourcing mytheme..."
plugins+=(custom:mytheme)
5 changes: 5 additions & 0 deletions tests/tmp_home/.zsh/functions/myfunc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/zsh
function myfunc {
echo myfunc "$@"
}
myfunc "$@"

0 comments on commit eba675e

Please sign in to comment.