|
| 1 | +test: nested real-zsyh cross-calls |
| 2 | + |
| 3 | +.PHONY: nested |
| 4 | +nested: ../build/zsd ../build/zsd-transform ../build/zsd-detect ../build/zsd-to-adoc nested.zsh |
| 5 | + @echo "--- Testing: nested.zsh ---" |
| 6 | + rm -rf zsdoc |
| 7 | + ../build/zsd -q nested.zsh |
| 8 | + @zsh -c 'exit 0' || { echo "Zsh unavailable, cannot test if scripts compile (nested.zsh)"; exit 1; } |
| 9 | + @zsh -c 'zcompile "zsdoc/data/bodies/nested.zsh" 2>/dev/null || echo "Error compiling script body"' |
| 10 | + @zsh -c 'zcompile "zsdoc/data/functions/nested.zsh/dummy" 2>/dev/null || echo "Error compiling function: dummy"' |
| 11 | + @zsh -c 'zcompile "zsdoc/data/functions/nested.zsh/test1" 2>/dev/null || echo "Error compiling function: test1"' |
| 12 | + @zsh -c 'zcompile "zsdoc/data/functions/nested.zsh/test2" 2>/dev/null || echo "Error compiling function: test2"' |
| 13 | + @zsh -c 'zcompile "zsdoc/data/functions/nested.zsh/test3" 2>/dev/null || echo "Error compiling function: test3"' |
| 14 | + @zsh -c 'zcompile "zsdoc/data/functions/nested.zsh/test4" 2>/dev/null || echo "Error compiling function: test4"' |
| 15 | + @zsh -c 'zcompile "zsdoc/data/functions/nested.zsh/test5" 2>/dev/null || echo "Error compiling function: test5"' |
| 16 | + @zsh -c 'zcompile "zsdoc/data/functions/nested.zsh/test6" 2>/dev/null || echo "Error compiling function: test6"' |
| 17 | + @find zsdoc/data/functions zsdoc/data/bodies -iname '*.zwc' -exec rm -f \{\} \; |
| 18 | + @mkdir -p nested/data/hooks/nested.zsh |
| 19 | + diff -r zsdoc nested |
| 20 | + @echo "--- Success: no difference between found ---" |
| 21 | + |
| 22 | +.PHONY: real-zsyh |
| 23 | +real-zsyh: ../build/zsd ../build/zsd-transform ../build/zsd-detect ../build/zsd-to-adoc real-zsyh.zsh |
| 24 | + @echo "--- Testing: real-zsyh.zsh ---" |
| 25 | + rm -rf zsdoc |
| 26 | + ../build/zsd -q real-zsyh.zsh |
| 27 | + @zsh -c 'exit 0' || { echo "Zsh unavailable, cannot test if scripts compile (real-zsyh.zsh)"; exit 1; } |
| 28 | + @zsh -c 'zcompile "zsdoc/data/bodies/real-zsyh.zsh" 2>/dev/null || echo "Error compiling script body"' |
| 29 | + @zsh -c 'zcompile "zsdoc/data/functions/real-zsyh.zsh/_zsh_highlight" 2>/dev/null || echo "Error compiling function: _zsh_highlight"' |
| 30 | + @zsh -c 'zcompile "zsdoc/data/functions/real-zsyh.zsh/_zsh_highlight_add_highlight" 2>/dev/null || echo "Error compiling function: _zsh_highlight_add_highlight"' |
| 31 | + @zsh -c 'zcompile "zsdoc/data/functions/real-zsyh.zsh/_zsh_highlight_apply_zle_highlight" 2>/dev/null || echo "Error compiling function: _zsh_highlight_apply_zle_highlight"' |
| 32 | + @zsh -c 'zcompile "zsdoc/data/functions/real-zsyh.zsh/_zsh_highlight_bind_widgets" 2>/dev/null || echo "Error compiling function: _zsh_highlight_bind_widgets"' |
| 33 | + @zsh -c 'zcompile "zsdoc/data/functions/real-zsyh.zsh/_zsh_highlight_buffer_modified" 2>/dev/null || echo "Error compiling function: _zsh_highlight_buffer_modified"' |
| 34 | + @zsh -c 'zcompile "zsdoc/data/functions/real-zsyh.zsh/_zsh_highlight_call_widget" 2>/dev/null || echo "Error compiling function: _zsh_highlight_call_widget"' |
| 35 | + @zsh -c 'zcompile "zsdoc/data/functions/real-zsyh.zsh/_zsh_highlight_cursor_moved" 2>/dev/null || echo "Error compiling function: _zsh_highlight_cursor_moved"' |
| 36 | + @zsh -c 'zcompile "zsdoc/data/functions/real-zsyh.zsh/_zsh_highlight_load_highlighters" 2>/dev/null || echo "Error compiling function: _zsh_highlight_load_highlighters"' |
| 37 | + @zsh -c 'zcompile "zsdoc/data/functions/real-zsyh.zsh/_zsh_highlight_preexec_hook" 2>/dev/null || echo "Error compiling function: _zsh_highlight_preexec_hook"' |
| 38 | + @find zsdoc/data/functions zsdoc/data/bodies -iname '*.zwc' -exec rm -f \{\} \; |
| 39 | + @mkdir -p real-zsyh/data/hooks/real-zsyh.zsh |
| 40 | + diff -r zsdoc real-zsyh |
| 41 | + @echo "--- Success: no difference between found ---" |
| 42 | + |
| 43 | +.PHONY: cross-calls |
| 44 | +cross-calls: ../build/zsd ../build/zsd-transform ../build/zsd-detect ../build/zsd-to-adoc cross-calls1.zsh cross-calls2.zsh |
| 45 | + @echo "--- Testing: cross-calls1.zsh, cross-calls2.zsh ---" |
| 46 | + rm -rf zsdoc |
| 47 | + ../build/zsd -q cross-calls1.zsh cross-calls2.zsh |
| 48 | + @zsh -c 'exit 0' || { echo "Zsh unavailable, cannot test if scripts compile (cross-calls*.zsh)"; exit 1; } |
| 49 | + @zsh -c 'zcompile "zsdoc/data/bodies/cross-calls1.zsh" 2>/dev/null || echo "Error compiling 1st script body"' |
| 50 | + @zsh -c 'zcompile "zsdoc/data/bodies/cross-calls2.zsh" 2>/dev/null || echo "Error compiling 2nd script body"' |
| 51 | + @zsh -c 'zcompile "zsdoc/data/functions/cross-calls1.zsh/myfun1" 2>/dev/null || echo "Error compiling function: cross-calls1.zsh/myfun1"' |
| 52 | + @zsh -c 'zcompile "zsdoc/data/functions/cross-calls1.zsh/myfun2" 2>/dev/null || echo "Error compiling function: cross-calls1.zsh/myfun2"' |
| 53 | + @zsh -c 'zcompile "zsdoc/data/functions/cross-calls2.zsh/myfun1" 2>/dev/null || echo "Error compiling function: cross-calls2.zsh/myfun1"' |
| 54 | + @zsh -c 'zcompile "zsdoc/data/functions/cross-calls2.zsh/myfun3" 2>/dev/null || echo "Error compiling function: cross-calls2.zsh/myfun3"' |
| 55 | + @find zsdoc/data/functions zsdoc/data/bodies -iname '*.zwc' -exec rm -f \{\} \; |
| 56 | + @mkdir -p cross-calls/data/hooks/cross-calls1.zsh cross-calls/data/hooks/cross-calls2.zsh |
| 57 | + diff -r zsdoc cross-calls |
| 58 | + @echo "--- Success: no difference between found ---" |
| 59 | + |
| 60 | +.PHONY: clean |
| 61 | +clean: |
| 62 | + rm -rf zsdoc |
0 commit comments