3.77. kink/test/COLLECT

Provides funs to collect tests. Used with TEST.collect_in.



:Tests <- TEST.collect_in{
  # Loads tests in test/kink/**/*_test.kn

  # Loads tests in ad-hoc.kn
Tests.each{(:T) T.run }

3.77.1. COLLECT.under(Path)

`under` collects tests under the Path.

If the Path is a file, it calls COLLECT.file.

If the Path is a dir, it calls COLLECT.file for all the files matching the name pattern *_test.kn case-insensitively under the dir, recursively.

Otherwise, it raises an exception.

3.77.2. COLLECT.file(File_path)

Collects tests in the Kink script in the specified program file.

The dirname and the basename of the File_path are added to the addr_parts of the tests.