Up to [cvs.NetBSD.org] / src / tests / usr.bin / indent
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
tests/indent: add miscellaneous test cases found during clean up
tests/indent: migrate token tests to other tests In indent.h 1.49 from 2021-10-25, the enumeration token_type was split into lexer_symbol and parser_symbol to more clearly express that these tokens fall into completely different classes of usage patterns.
tests/indent: change directive from '#' to '//' Using a '//' instead of '#' turns the directives into well-formed C code, resulting in fewer error markers in the editor.
indent: remove FreeBSD IDs Most of the IDs were empty anyway.
indent: fix tokenizing of word-like tokens (since 2019-04-04) After a backslash-newline, the first character of the next line is only part of the identifier if it is an identifier character. indent-2000.10.11.14.46.04 | int var \ | +name = 4; indent-2012.11.20.03.02.57 indent-2014.09.04.04.06.07 | int var \ | +name = 4; indent-2019.02.03.03.19.29 indent-2019.04.04.15.27.35 | int var+name = 4; indent-2021.11.19.20.23.17 indent | int var + name = 4;
tests/indent: demonstrate wrong identifier token (since 2019-04-04) No matter how simple a piece of code is, without proper automated tests there is always the chance of breaking it.
tests/indent: add skeletons for testing tokens and parser symbols The constants that were previously defined in indent_codes.h were a wild mixture of tokens from the lexer and symbols on the parser stack. They were split into separate types starting at indent.h 1.49 from 2021-10-25 and finishing at 1.73 from 2021-10-31. To match the tests with the new token names, the old tests need to be migrated to the newly added tests. This will take some time so first add the skeletons and migrate them in smaller steps, cleaning them up and extending them on the way.