File tree Expand file tree Collapse file tree 4 files changed +36
-1
lines changed
Expand file tree Collapse file tree 4 files changed +36
-1
lines changed Original file line number Diff line number Diff line change @@ -34,4 +34,6 @@ neko.sln
3434bin
3535/extra /chocolatey /LICENSE
3636/extra /chocolatey /* .zip
37- /extra /chocolatey /* .nupkg
37+ /extra /chocolatey /* .nupkg
38+
39+ /tests /* .n
Original file line number Diff line number Diff line change @@ -782,6 +782,8 @@ add_test(NAME nekotools
782782 WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
783783)
784784
785+ add_subdirectory (tests)
786+
785787#######################
786788
787789# debian source packages
Original file line number Diff line number Diff line change 1+ add_custom_target (goto.n
2+ COMMAND nekoc -o ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} /tests/ ${CMAKE_SOURCE_DIR} /tests/goto.neko
3+ WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
4+ DEPENDS nekoc
5+ )
6+
7+ add_test (NAME goto.n
8+ COMMAND nekovm tests/goto.n
9+ WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
10+ )
11+
12+ set_property (TEST goto.n PROPERTY
13+ PASS_REGULAR_EXPRESSION "startcontinue1continue2end"
14+ )
Original file line number Diff line number Diff line change 1+ $print("start");
2+ $goto(forward);
3+
4+ $print("skip");
5+
6+ backward:
7+ $print("continue2");
8+ $goto(end);
9+
10+ forward:
11+ $print("continue1");
12+ $goto(backward);
13+
14+ $print("skip");
15+
16+ end:
17+ $print("end");
You can’t perform that action at this time.
0 commit comments