Branch: refs/heads/master Author: Jiří Techet techet@gmail.com Committer: Jiří Techet techet@gmail.com Date: Sun, 24 Nov 2024 22:30:18 UTC Commit: c7d5a2603de6a3a021d60414624c84cb25056541 https://github.com/geany/geany/commit/c7d5a2603de6a3a021d60414624c84cb250565...
Log Message: ----------- Add forth ctags unit test
Modified Paths: -------------- tests/ctags/Makefile.am tests/ctags/simple.fth tests/ctags/simple.fth.tags tests/meson.build
Modified: tests/ctags/Makefile.am 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -307,6 +307,7 @@ test_sources = \ simple.d \ simple.diff \ simple.docbook \ + simple.fth \ simple.hs \ simple.hx \ simple.html \
Modified: tests/ctags/simple.fth 31 lines changed, 31 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,31 @@ + +( https://rosettacode.org/wiki/FizzBuzz#Forth / https://skilldrick.github.io/easyforth/ ) + +\ Works in gforth and other ANS forth. Other Forth may differ. + +10 constant DUMMY1 +12 CONSTANT DUMMY2 + +variable dummy3 +variable dummy4 +VARIABLE dummy5 + +11 dummy3 ! +13 dummy4 ! + +: fizz? \ a simple comment +3 mod 0 = dup if ." Fizz" then ; +: buzz? +5 mod 0 = dup if ." Buzz" then ; + +: fizz-buzz? +dup fizz? swap buzz? or invert ; + +: do-fizz-buzz +25 1 do cr i fizz-buzz? if i . then loop ; + +do-fizz-buzz +cr + +quit +\ bye
Modified: tests/ctags/simple.fth.tags 18 lines changed, 18 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,18 @@ +DUMMY1�65536�0 +macro: DUMMY1 +DUMMY2�65536�0 +macro: DUMMY2 +buzz?�16�0 +function: buzz? +do-fizz-buzz�16�0 +function: do-fizz-buzz +dummy3�16384�0 +variable: dummy3 +dummy4�16384�0 +variable: dummy4 +dummy5�16384�0 +variable: dummy5 +fizz-buzz?�16�0 +function: fizz-buzz? +fizz?�16�0 +function: fizz?
Modified: tests/meson.build 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -304,6 +304,7 @@ ctags_tests = [ 'ctags/simple.d.tags', 'ctags/simple.diff.tags', 'ctags/simple.docbook.tags', + 'ctags/simple.fth.tags', 'ctags/simple.hs.tags', 'ctags/simple.hx.tags', 'ctags/simple.html.tags',
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).