Skip to content

Commit

Permalink
patch 9.0.1627: no generic mechanism to test syntax plugins
Browse files Browse the repository at this point in the history
Problem:    No generic mechanism to test syntax plugins.
Solution:   Add a syntax plugin test mechanism, using screendumps.  Add a
            simple test for "c".
  • Loading branch information
brammool committed Jun 11, 2023
1 parent 10e8ff9 commit 46acad7
Show file tree
Hide file tree
Showing 15 changed files with 542 additions and 2 deletions.
5 changes: 5 additions & 0 deletions Filelist
Original file line number Diff line number Diff line change
Expand Up @@ -805,6 +805,11 @@ RT_SCRIPTS = \
runtime/syntax/README.txt \
runtime/syntax/shared/*.vim \
runtime/syntax/shared/README.txt \
runtime/syntax/Makefile \
runtime/syntax/testdir/README.txt \
runtime/syntax/testdir/runtest.vim \
runtime/syntax/testdir/input/*.* \
runtime/syntax/testdir/dumps/*.dump \

# Unix runtime
RT_UNIX = \
Expand Down
15 changes: 13 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,17 @@ all install uninstall tools config configure reconfig proto depend lint tags typ
@echo "Starting make in the src directory."
@echo "If there are problems, cd to the src directory and run make there"
cd src && $(MAKE) $@
@# When the target is "test" also run the indent tests.
@# When the target is "test" also run the indent and syntax tests.
@if test "$@" = "test"; then \
$(MAKE) indenttest; \
$(MAKE) syntaxtest; \
fi
@# When the target is "clean" also clean for the indent tests.
@# When the target is "clean" also clean for the indent and syntax tests.
@if test "$@" = "clean" -o "$@" = "distclean" -o "$@" = "testclean"; then \
cd runtime/indent && \
$(MAKE) clean; \
cd runtime/syntax && \
$(MAKE) clean; \
fi

# Executable used for running the indent tests.
Expand All @@ -57,6 +60,14 @@ indenttest:
$(MAKE) clean && \
$(MAKE) test VIM="$(VIM_FOR_INDENTTEST)"

# Executable used for running the syntax tests.
VIM_FOR_SYNTAXTEST = ../../src/vim

syntaxtest:
cd runtime/syntax && \
$(MAKE) clean && \
$(MAKE) test VIM="$(VIM_FOR_SYNTAXTEST)"


#########################################################################
# 2. Creating the various distribution files.
Expand Down
27 changes: 27 additions & 0 deletions runtime/syntax/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Portable Makefile for running syntax tests.

# Override this if needed, e.g. with ../../src/vim
VIMPROG = vim

# "runtime" relative to "runtime/syntax/testdir"
VIMRUNTIME = ../..

# Uncomment this line to use valgrind for memory leaks and extra warnings.
# VALGRIND = valgrind --tool=memcheck --leak-check=yes --num-callers=45 --log-file=valgrind.$*

# ENVVARS = LC_ALL=C LANG=C LANGUAGE=C

RUN_VIMTEST = VIMRUNTIME=$(VIMRUNTIME) $(VALGRIND) $(ENVVARS) $(VIMPROG) -f $(GUI_FLAG)

# Run the tests that didn't run yet or failed previously.
# If a test succeeds a testdir/done/{name} file will be written.
# If a test fails a testdir/failed/{name}.dump file will be written.
test:
@# the "vimcmd" file is used by the screendump utils
@echo "$(VIMPROG)" > testdir/vimcmd
@echo "$(RUN_VIMTEST)" >> testdir/vimcmd
VIMRUNTIME=$(VIMRUNTIME) $(VIMPROG) --clean --not-a-term -u testdir/runtest.vim


clean testclean:
rm -f testdir/failed/* testdir/done/* testdir/vimcmd
97 changes: 97 additions & 0 deletions runtime/syntax/testdir/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
Tests for syntax highlighting plugins
=====================================

Summary: Files in the "input" directory are edited by Vim with syntax
highlighting enabled. Screendumps are generated and compared with the
expected screendumps in the "dumps" directory. This will uncover any
character attributes that differ.

Without any further setup a screendump is made at the top of the file (using
_00.dump) and another one at the end of the file (using _99.dump). The dumps
are normally 20 screen lines tall.

When the screendumps are OK an empty "done/{name}" file is created. This
avoids running the test again until "make clean" is used. Thus you can run
"make test", see one test fail, try to fix the problem, then run "make test"
again to only repeat the failing test.

When a screendump differs it is stored in the "failed" directory. This allows
for comparing it with the expected screendump, using a command like:

let fname = '{name}_99.dump'
call term_dumpdiff('failed/' .. fname, 'dumps/' .. fname)


Creating a syntax plugin test
-----------------------------

Create a source file in the language you want to test in the "input"
directory. Make sure to include some interesting constructs with complicated
highlighting.

Use the filetype name as the base and a file name extension matching the
filetype. Let's use Java as an example. The file would then be
"input/java.java".

If there is no further setup required, you can now run the tests:
make test

The first time this will fail with an error for a missing screendump. The
newly created screendumps will be "failed/java_00.dump",
"failed/java_01.dump", etc. You can inspect each with:

call term_dumpload('failed/java_00.dump')
call term_dumpload('failed/java_01.dump')
...
call term_dumpload('failed/java_99.dump')

If they look OK, move them to the "dumps" directory:

:!mv failed/java_00.dump dumps
:!mv failed/java_01.dump dumps
...
:!mv failed/java_99.dump dumps

If you now run the test again, it will succeed.


Adjusting a syntax plugin test
------------------------------

If you make changes to the syntax plugin, you should add code to the input
file to see the effect of these changes. So that the effect of the changes
are covered by the test. You can follow these steps:

1. Edit the syntax plugin somewhere in your personal setup. Use a file
somewhere to try out the changes.
2. Go to the directory where you have the Vim code checked out and replace the
syntax plugin. Run the tests: "make test". Usually the tests will still
pass, but if you fixed syntax highlighting that was already visible in the
input file, carefully check that the changes in the screendump are
intentional:
let fname = '{name}_99.dump'
call term_dumpdiff('failed/' .. fname, 'dumps/' .. fname)
Fix the syntax plugin until the result is good.
2. Edit the input file for your language to add the items you have improved.
(TODO: how to add another screendump?).
Run the tests and you should get failures. Like with the previous step,
carefully check that the new screendumps in the "failed" directory are
good. Update the syntax plugin and the input file until the highlighting
is good and you can see the effect of the syntax plugin improvements. Then
move the screendumps from the "failed" to the "dumps" directory. Now "make
test" should succeed.
3. Prepare a pull request with the modified files:
- syntax plugin: syntax/{name}.vim
- test input file: syntax/testdir/input/{name}.{ext}
- test dump files: syntax/testdir/dumps/{name}_99.dump

As an extra check you can temporarily put back the old syntax plugin and
verify that the tests fail. Then you know your changes are covered by the
test.



TODO: run test for one specific filetype

TODO: testing with various option values
TODO: test syncing by jumping around
20 changes: 20 additions & 0 deletions runtime/syntax/testdir/dumps/c_00.dump
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
>/+0#0000e05#ffffff0|*| |v|i|:|s|e|t| |t|s|=|8+0#e000002&| +0#0000e05&|s|t|s|=|4+0#e000002&| +0#0000e05&|s|w|=|4+0#e000002&| +0#0000e05&|n|o|e|t|:| +0#0000000&@43
| +0#0000e05&|*| +0#0000000&@72
| +0#0000e05&|*| |V|I|M| |-| |V|i| |I|M|p|r|o|v|e|d| @3|b|y| |B|r|a|m| |M|o@1|l|e|n|a@1|r| +0#0000000&@33
| +0#0000e05&|*| +0#0000000&@72
| +0#0000e05&|*| |D|o| |"+0#e000002&|:|h|e|l|p| |u|g|a|n|d|a|"| +0#0000e05&@1|i|n| |V|i|m| |t|o| |r|e|a|d| |c|o|p|y|i|n|g| |a|n|d| |u|s|a|g|e| |c|o|n|d|i|t|i|o|n|s|.| +0#0000000&@8
| +0#0000e05&|*| |D|o| |"+0#e000002&|:|h|e|l|p| |c|r|e|d|i|t|s|"| +0#0000e05&|i|n| |V|i|m| |t|o| |s|e@1| |a| |l|i|s|t| |o|f| |p|e|o|p|l|e| |w|h|o| |c|o|n|t|r|i|b|u|t|e|d|.| +0#0000000&@5
| +0#0000e05&|*| |S|e@1| |R|E|A|D|M|E|.|t|x|t| |f|o|r| |a|n| |o|v|e|r|v|i|e|w| |o|f| |t|h|e| |V|i|m| |s|o|u|r|c|e| |c|o|d|e|.| +0#0000000&@17
| +0#0000e05&|*|/| +0#0000000&@71
@75
|#+0#e000e06&|d|e|f|i|n|e| |E|X|T|E|R|N| +0#0000000&@60
|#+0#e000e06&|i|n|c|l|u|d|e| |"+0#e000002&|v|i|m|.|h|"| +0#0000000&@58
@75
|#+0#e000e06&|i|f|d|e|f| |_@1|C|Y|G|W|I|N|_@1| +0#0000000&@57
|#+0#e000e06&| |i|n|c|l|u|d|e| |<+0#e000002&|c|y|g|w|i|n|/|v|e|r|s|i|o|n|.|h|>| +0#0000000&@46
|#+0#e000e06&| |i|n|c|l|u|d|e| |<+0#e000002&|s|y|s|/|c|y|g|w|i|n|.|h|>| +0#0000000&@7|/+0#0000e05&@1| |f|o|r| |c|y|g|w|i|n|_|c|o|n|v|_|t|o|_|p|o|s|i|x|_|p|a|t|h|(|)| |a|n|d|/|o|r| +0#0000000&@1
@32|/+0#0000e05&@1| |c|y|g|w|i|n|_|c|o|n|v|_|p|a|t|h|(|)| +0#0000000&@21
|#+0#e000e06&| |i|n|c|l|u|d|e| |<+0#e000002&|l|i|m|i|t|s|.|h|>| +0#0000000&@54
|#+0#e000e06&|e|n|d|i|f| +0#0000000&@68
@75
|"|i|n|p|u|t|/|c|.|c|"| |1|2@1|L|,| |3|1|7|4|B| @33|1|,|1| @10|T|o|p|
20 changes: 20 additions & 0 deletions runtime/syntax/testdir/dumps/c_01.dump
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
|#+0#e000e06#ffffff0| |i|n|c|l|u|d|e| |<+0#e000002&|c|y|g|w|i|n|/|v|e|r|s|i|o|n|.|h|>| +0#0000000&@46
|#+0#e000e06&| |i|n|c|l|u|d|e| |<+0#e000002&|s|y|s|/|c|y|g|w|i|n|.|h|>| +0#0000000&@7|/+0#0000e05&@1| |f|o|r| |c|y|g|w|i|n|_|c|o|n|v|_|t|o|_|p|o|s|i|x|_|p|a|t|h|(|)| |a|n|d|/|o|r| +0#0000000&@1
@32|/+0#0000e05&@1| |c|y|g|w|i|n|_|c|o|n|v|_|p|a|t|h|(|)| +0#0000000&@21
|#+0#e000e06&| |i|n|c|l|u|d|e| |<+0#e000002&|l|i|m|i|t|s|.|h|>| +0#0000000&@54
|#+0#e000e06&|e|n|d|i|f| +0#0000000&@68
> @74
|#+0#e000e06&|i|f| |d|e|f|i|n|e|d|(|M|S|W|I|N|)| |&@1| |(|!|d|e|f|i|n|e|d|(|F|E|A|T|_|G|U|I|_|M|S|W|I|N|)| ||@1| |d|e|f|i|n|e|d|(|V|I|M|D|L@1|)@1| +0#0000000&@7
|#+0#e000e06&| |i|n|c|l|u|d|e| |"+0#e000002&|i|s|c|y|g|p|t|y|.|h|"| +0#0000000&@52
|#+0#e000e06&|e|n|d|i|f| +0#0000000&@68
@75
|/+0#0000e05&@1| |V|a|l|u|e|s| |f|o|r| |e|d|i|t|_|t|y|p|e|.| +0#0000000&@50
|#+0#e000e06&|d|e|f|i|n|e| |E|D|I|T|_|N|O|N|E| @2|0+0#e000002&| +0#e000e06&@6|/+0#0000e05&@1| |n|o| |e|d|i|t| |t|y|p|e| |y|e|t| +0#0000000&@27
|#+0#e000e06&|d|e|f|i|n|e| |E|D|I|T|_|F|I|L|E| @2|1+0#e000002&| +0#e000e06&@6|/+0#0000e05&@1| |f|i|l|e| |n|a|m|e| |a|r|g|u|m|e|n|t|[|s|]| |g|i|v|e|n|,| |u|s|e| |a|r|g|u|m|e|n|t| |l|i
|s|t| +0#0000000&@72
|#+0#e000e06&|d|e|f|i|n|e| |E|D|I|T|_|S|T|D|I|N| @1|2+0#e000002&| +0#e000e06&@6|/+0#0000e05&@1| |r|e|a|d| |f|i|l|e| |f|r|o|m| |s|t|d|i|n| +0#0000000&@23
|#+0#e000e06&|d|e|f|i|n|e| |E|D|I|T|_|T|A|G| @3|3+0#e000002&| +0#e000e06&@6|/+0#0000e05&@1| |t|a|g| |n|a|m|e| |a|r|g|u|m|e|n|t| |g|i|v|e|n|,| |u|s|e| |t|a|g|n|a|m|e| +0#0000000&@7
|#+0#e000e06&|d|e|f|i|n|e| |E|D|I|T|_|Q|F| @4|4+0#e000002&| +0#e000e06&@6|/+0#0000e05&@1| |s|t|a|r|t| |i|n| |q|u|i|c|k|f|i|x| |m|o|d|e| +0#0000000&@21
@75
|#+0#e000e06&|i|f| |(|d|e|f|i|n|e|d|(|U|N|I|X|)| ||@1| |d|e|f|i|n|e|d|(|V|M|S|)@1| |&@1| |!|d|e|f|i|n|e|d|(|N|O|_|V|I|M|_|M|A|I|N|)| +0#0000000&@14
@57|1|9|,|0|-|1| @7|1|2|%|
20 changes: 20 additions & 0 deletions runtime/syntax/testdir/dumps/c_02.dump
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
|s+0#00e0003#ffffff0|t|a|t|i|c| +0#0000000&|i+0#00e0003&|n|t| +0#0000000&|f|i|l|e|_|o|w|n|e|d|(|c+0#00e0003&|h|a|r| +0#0000000&|*|f|n|a|m|e|)|;| @39
|#+0#e000e06&|e|n|d|i|f| +0#0000000&@68
|s+0#00e0003&|t|a|t|i|c| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&|m|a|i|n|e|r@1|(|i+0#00e0003&|n|t|,+0#0000000&| |c|h|a|r|_|u| |*|)|;| @39
|s+0#00e0003&|t|a|t|i|c| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&|e|a|r|l|y|_|a|r|g|_|s|c|a|n|(|m|p|a|r|m|_|T| |*|p|a|r|m|p|)|;| @31
|#+0#e000e06&|i|f|n|d|e|f| |N|O|_|V|I|M|_|M|A|I|N| +0#0000000&@55
>s+0#00e0003&|t|a|t|i|c| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&|u|s|a|g|e|(|v+0#00e0003&|o|i|d|)+0#0000000&|;| @50
|s+0#00e0003&|t|a|t|i|c| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&|p|a|r|s|e|_|c|o|m@1|a|n|d|_|n|a|m|e|(|m|p|a|r|m|_|T| |*|p|a|r|m|p|)|;| @27
|s+0#00e0003&|t|a|t|i|c| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&|c|o|m@1|a|n|d|_|l|i|n|e|_|s|c|a|n|(|m|p|a|r|m|_|T| |*|p|a|r|m|p|)|;| @28
|s+0#00e0003&|t|a|t|i|c| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&|c|h|e|c|k|_|t@1|y|(|m|p|a|r|m|_|T| |*|p|a|r|m|p|)|;| @36
|s+0#00e0003&|t|a|t|i|c| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&|r|e|a|d|_|s|t|d|i|n|(|v+0#00e0003&|o|i|d|)+0#0000000&|;| @45
|s+0#00e0003&|t|a|t|i|c| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&|c|r|e|a|t|e|_|w|i|n|d|o|w|s|(|m|p|a|r|m|_|T| |*|p|a|r|m|p|)|;| @31
|s+0#00e0003&|t|a|t|i|c| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&|e|d|i|t|_|b|u|f@1|e|r|s|(|m|p|a|r|m|_|T| |*|p|a|r|m|p|,| |c|h|a|r|_|u| |*|c|w|d|)|;| @20
|s+0#00e0003&|t|a|t|i|c| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&|e|x|e|_|p|r|e|_|c|o|m@1|a|n|d|s|(|m|p|a|r|m|_|T| |*|p|a|r|m|p|)|;| @29
|s+0#00e0003&|t|a|t|i|c| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&|e|x|e|_|c|o|m@1|a|n|d|s|(|m|p|a|r|m|_|T| |*|p|a|r|m|p|)|;| @33
|s+0#00e0003&|t|a|t|i|c| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&|s|o|u|r|c|e|_|s|t|a|r|t|u|p|_|s|c|r|i|p|t|s|(|m|p|a|r|m|_|T| |*|p|a|r|m|p|)|;| @23
|s+0#00e0003&|t|a|t|i|c| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&|m|a|i|n|_|s|t|a|r|t|_|g|u|i|(|v+0#00e0003&|o|i|d|)+0#0000000&|;| @41
|s+0#00e0003&|t|a|t|i|c| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&|c|h|e|c|k|_|s|w|a|p|_|e|x|i|s|t|s|_|a|c|t|i|o|n|(|v+0#00e0003&|o|i|d|)+0#0000000&|;| @31
|#+0#e000e06&| |i|f|d|e|f| |F|E|A|T|_|E|V|A|L| +0#0000000&@57
|s+0#00e0003&|t|a|t|i|c| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&|s|e|t|_|p|r|o|g|p|a|t|h|(|c|h|a|r|_|u| |*|a|r|g|v|0|)|;| @34
@57|3|7|,|1| @9|3|0|%|
20 changes: 20 additions & 0 deletions runtime/syntax/testdir/dumps/c_03.dump
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
|s+0#00e0003#ffffff0|t|a|t|i|c| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&|s|e|t|_|p|r|o|g|p|a|t|h|(|c|h|a|r|_|u| |*|a|r|g|v|0|)|;| @34
|#+0#e000e06&| |e|n|d|i|f| +0#0000000&@67
|#+0#e000e06&|e|n|d|i|f| +0#0000000&@68
@75
@75
>/+0#0000e05&|*| +0#0000000&@72
| +0#0000e05&|*| |D|i|f@1|e|r|e|n|t| |t|y|p|e|s| |o|f| |e|r@1|o|r| |m|e|s@1|a|g|e|s|.| +0#0000000&@37
| +0#0000e05&|*|/| +0#0000000&@71
|s+0#00e0003&|t|a|t|i|c| +0#0000000&|c+0#00e0003&|h|a|r| +0#0000000&|*|(|m|a|i|n|_|e|r@1|o|r|s|[|]|)| |=| @44
|{| @73
@4|N|_|(|"+0#e000002&|U|n|k|n|o|w|n| |o|p|t|i|o|n| |a|r|g|u|m|e|n|t|"|)+0#0000000&|,| @40
|#+0#e000e06&|d|e|f|i|n|e| |M|E|_|U|N|K|N|O|W|N|_|O|P|T|I|O|N| @6|0+0#e000002&| +0#0000000&@41
@4|N|_|(|"+0#e000002&|T|o@1| |m|a|n|y| |e|d|i|t| |a|r|g|u|m|e|n|t|s|"|)+0#0000000&|,| @40
|#+0#e000e06&|d|e|f|i|n|e| |M|E|_|T|O@1|_|M|A|N|Y|_|A|R|G|S| @7|1+0#e000002&| +0#0000000&@41
@4|N|_|(|"+0#e000002&|A|r|g|u|m|e|n|t| |m|i|s@1|i|n|g| |a|f|t|e|r|"|)+0#0000000&|,| @41
|#+0#e000e06&|d|e|f|i|n|e| |M|E|_|A|R|G|_|M|I|S@1|I|N|G| @9|2+0#e000002&| +0#0000000&@41
@4|N|_|(|"+0#e000002&|G|a|r|b|a|g|e| |a|f|t|e|r| |o|p|t|i|o|n| |a|r|g|u|m|e|n|t|"|)+0#0000000&|,| @34
|#+0#e000e06&|d|e|f|i|n|e| |M|E|_|G|A|R|B|A|G|E| @13|3+0#e000002&| +0#0000000&@41
|@+0#4040ff13&@2| @71
| +0#0000000&@56|5@1|,|1| @9|4|7|%|
20 changes: 20 additions & 0 deletions runtime/syntax/testdir/dumps/c_04.dump
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
| +0&#ffffff0@3|N|_|(|"+0#e000002&|T|o@1| |m|a|n|y| |\+0#e000e06&|"|++0#e000002&|c|o|m@1|a|n|d|\+0#e000e06&|"|,+0#e000002&| |\+0#e000e06&|"|-+0#e000002&|c| |c|o|m@1|a|n|d|\+0#e000e06&|"| +0#e000002&|o|r| |\+0#e000e06&|"|-+0#e000002&@1|c|m|d| |c|o|m@1|a|n|d|\+0#e000e06&|"| +0#e000002&|a|r|g|u|m|e|n|t
|s|"|)+0#0000000&|,| @70
|#+0#e000e06&|d|e|f|i|n|e| |M|E|_|E|X|T|R|A|_|C|M|D| @11|4+0#e000002&| +0#0000000&@41
@4|N|_|(|"+0#e000002&|I|n|v|a|l|i|d| |a|r|g|u|m|e|n|t| |f|o|r|"|)+0#0000000&|,| @43
|#+0#e000e06&|d|e|f|i|n|e| |M|E|_|I|N|V|A|L|I|D|_|A|R|G| @9|5+0#e000002&| +0#0000000&@41
|}|;| @72
> @74
|#+0#e000e06&|i|f|n|d|e|f| |P|R|O|T|O| @10|/+0#0000e05&@1| |d|o|n|'|t| |w|a|n|t| |a| |p|r|o|t|o|t|y|p|e| |f|o|r| |m|a|i|n|(|)| +0#0000000&@14
@75
|/+0#0000e05&@1| |V|a|r|i|o|u|s| |p|a|r|a|m|e|t|e|r|s| |p|a|s@1|e|d| |b|e|t|w|e@1|n| |m|a|i|n|(|)| |a|n|d| |o|t|h|e|r| |f|u|n|c|t|i|o|n|s|.| +0#0000000&@10
|s+0#00e0003&|t|a|t|i|c| +0#0000000&|m|p|a|r|m|_|T| @1|p|a|r|a|m|s|;| @51
@75
|#+0#e000e06&|i|f|d|e|f| |_|I|O|L|B|F| +0#0000000&@61
|s+0#00e0003&|t|a|t|i|c| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&|*|s|_|v|b|u|f| |=| |N+0#e000002&|U|L@1|;+0#0000000&| @12|/+0#0000e05&@1| |b|u|f@1|e|r| |f|o|r| |s|e|t|v|b|u|f|(|)| +0#0000000&@11
|#+0#e000e06&|e|n|d|i|f| +0#0000000&@68
@75
|#+0#e000e06&|i|f|n|d|e|f| |N|O|_|V|I|M|_|M|A|I|N| @4|/+0#0000e05&@1| |s|k|i|p| |t|h|i|s| |f|o|r| |u|n|i|t@1|e|s|t|s| +0#0000000&@24
@75
|s+0#00e0003&|t|a|t|i|c| +0#0000000&|c|h|a|r|_|u| |*|s|t|a|r|t|_|d|i|r| |=| |N+0#e000002&|U|L@1|;+0#0000000&| @7|/+0#0000e05&@1| |c|u|r@1|e|n|t| |w|o|r|k|i|n|g| |d|i|r| |o|n| |s|t|a|r|t|u|p| +0#0000000&@1
@57|7|3|,|0|-|1| @7|6|4|%|
20 changes: 20 additions & 0 deletions runtime/syntax/testdir/dumps/c_05.dump
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
| +0&#ffffff0@74
|s+0#00e0003&|t|a|t|i|c| +0#0000000&|i+0#00e0003&|n|t| +0#0000000&|h|a|s|_|d|a|s|h|_|c|_|a|r|g| |=| |F|A|L|S|E|;| @40
@75
|#+0#e000e06&| |i|f|d|e|f| |V|I|M|D|L@1| +0#0000000&@60
|_@1|d|e|c|l|s|p|e|c|(|d|l@1|e|x|p|o|r|t|)| @53
>#+0#e000e06&| |e|n|d|i|f| +0#0000000&@67
@4|i+0#00e0003&|n|t| +0#0000000&@67
|#+0#e000e06&| |i|f|d|e|f| |M|S|W|I|N| +0#0000000&@61
|V|i|m|M|a|i|n| @67
|#+0#e000e06&| |e|l|s|e| +0#0000000&@68
|m|a|i|n| @70
|#+0#e000e06&| |e|n|d|i|f| +0#0000000&@67
|(|i+0#00e0003&|n|t| +0#0000000&|a|r|g|c|,| |c+0#00e0003&|h|a|r| +0#0000000&|*@1|a|r|g|v|)| @51
|{| @73
|#+0#e000e06&|i|f| |d|e|f|i|n|e|d|(|S|T|A|R|T|U|P|T|I|M|E|)| ||@1| |d|e|f|i|n|e|d|(|C|L|E|A|N|_|R|U|N|T|I|M|E|P|A|T|H|)| +0#0000000&@20
@4|i+0#00e0003&|n|t| +0#0000000&@8|i|;| @56
|#+0#e000e06&|e|n|d|i|f| +0#0000000&@68
@75
@4|/+0#0000e05&|*| +0#0000000&@68
@57|9|1|,|1| @9|8|2|%|
20 changes: 20 additions & 0 deletions runtime/syntax/testdir/dumps/c_06.dump
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
| +0&#ffffff0@3|/+0#0000e05&|*| +0#0000000&@68
| +0#0000e05&@4|*| |D|o| |a|n|y| |s|y|s|t|e|m|-|s|p|e|c|i|f|i|c| |i|n|i|t|i|a|l|i|s|a|t|i|o|n|s|.| @1|T|h|e|s|e| |c|a|n| |N|O|T| |u|s|e| |I|O|b|u|f@1| |o|r
| @4|*| |N|a|m|e|B|u|f@1|.| @1|T|h|u|s| |e|m|s|g|2|(|)| |c|a|n@1|o|t| |b|e| |c|a|l@1|e|d|!| +0#0000000&@26
| +0#0000e05&@4|*|/| +0#0000000&@67
@4|m|c|h|_|e|a|r|l|y|_|i|n|i|t|(|)|;| @53
> @74
@4|/+0#0000e05&@1| |S|o|u|r|c|e| |s|t|a|r|t|u|p| |s|c|r|i|p|t|s|.| +0#0000000&@44
@4|s|o|u|r|c|e|_|s|t|a|r|t|u|p|_|s|c|r|i|p|t|s|(|&|p|a|r|a|m|s|)|;| @38
@75
|#+0#e000e06&|i|f| |0| +0#0000000&@69
| +0#0000e05&@3|/|*| +0#0000000&@68
| +0#0000e05&@4|*| |N|e|w|e|r| |v|e|r|s|i|o|n| |o|f| |M|z|S|c|h|e|m|e| |(|R|a|c|k|e|t|)| |r|e|q|u|i|r|e| |e|a|r|l|i|e|r| |(|t|r|a|m|p|o|l|i|n|e|d|)| +0#0000000&@3
| +0#0000e05&@4|*| |i|n|i|t|i|a|l|i|s|a|t|i|o|n| |v|i|a| |s|c|h|e|m|e|_|m|a|i|n|_|s|e|t|u|p|.| +0#0000000&@30
| +0#0000e05&@4|*|/| +0#0000000&@67
| +0#0000e05&@3|r|e|t|u|r|n| |m|z|s|c|h|e|m|e|_|m|a|i|n|(|)|;| +0#0000000&@47
|#+0#e000e06&|e|l|s|e| +0#0000000&@69
@4|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|v|i|m|_|m|a|i|n|2|(|)|;| @51
|#+0#e000e06&|e|n|d|i|f| +0#0000000&@68
|}| @73
@57|1|0|9|,|0|-|1| @6|B|o|t|
20 changes: 20 additions & 0 deletions runtime/syntax/testdir/dumps/c_99.dump
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
| +0&#ffffff0@3|/+0#0000e05&|*| +0#0000000&@68
| +0#0000e05&@4|*| |D|o| |a|n|y| |s|y|s|t|e|m|-|s|p|e|c|i|f|i|c| |i|n|i|t|i|a|l|i|s|a|t|i|o|n|s|.| @1|T|h|e|s|e| |c|a|n| |N|O|T| |u|s|e| |I|O|b|u|f@1| |o|r
| @4|*| |N|a|m|e|B|u|f@1|.| @1|T|h|u|s| |e|m|s|g|2|(|)| |c|a|n@1|o|t| |b|e| |c|a|l@1|e|d|!| +0#0000000&@26
| +0#0000e05&@4|*|/| +0#0000000&@67
@4|m|c|h|_|e|a|r|l|y|_|i|n|i|t|(|)|;| @53
@75
@4|/+0#0000e05&@1| |S|o|u|r|c|e| |s|t|a|r|t|u|p| |s|c|r|i|p|t|s|.| +0#0000000&@44
@4|s|o|u|r|c|e|_|s|t|a|r|t|u|p|_|s|c|r|i|p|t|s|(|&|p|a|r|a|m|s|)|;| @38
@75
|#+0#e000e06&|i|f| |0| +0#0000000&@69
| +0#0000e05&@3|/|*| +0#0000000&@68
| +0#0000e05&@4|*| |N|e|w|e|r| |v|e|r|s|i|o|n| |o|f| |M|z|S|c|h|e|m|e| |(|R|a|c|k|e|t|)| |r|e|q|u|i|r|e| |e|a|r|l|i|e|r| |(|t|r|a|m|p|o|l|i|n|e|d|)| +0#0000000&@3
| +0#0000e05&@4|*| |i|n|i|t|i|a|l|i|s|a|t|i|o|n| |v|i|a| |s|c|h|e|m|e|_|m|a|i|n|_|s|e|t|u|p|.| +0#0000000&@30
| +0#0000e05&@4|*|/| +0#0000000&@67
| +0#0000e05&@3|r|e|t|u|r|n| |m|z|s|c|h|e|m|e|_|m|a|i|n|(|)|;| +0#0000000&@47
|#+0#e000e06&|e|l|s|e| +0#0000000&@69
@4|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|v|i|m|_|m|a|i|n|2|(|)|;| @51
|#+0#e000e06&|e|n|d|i|f| +0#0000000&@68
>}| @73
@57|1|2@1|,|1| @8|B|o|t|

0 comments on commit 46acad7

Please sign in to comment.