BF: fix syntax error in tests; add tests for funcs

Fix missing end of conditional.

Add some tests for extra supporting functions.