You can actually also pass a series of files:
If you use
The code entered will be added to the special "user" module. See: Reserved Modules and using the‘user' module
If there are files "roo", "foo", "
foo.pl" and "
also load "
Loading file "foo" is not possible, but
still loads "roo"
It is only the suffix ".pl" which is processed this way. If the suffix is not ".pl", you cannot leave the suffix out in the argument to consult. This is relevant for files containing plunit unit test code, which are supposed to end in '.plt'.
Loading unit test files
At plunit), we read:
"Test-units can be embedded in normal Prolog source-files. Alternatively, tests for a source-file can be placed in another file alongside the file to be tested. Test files use the extension .plt. The predicate load_test_files/1 can load all files that are related to source-files loaded into the current project."
There is no direct support for files ending in .plt via [consult], you have to write