2.8. Can a test check the output of System.out and System.err?

Yes, compiler tests using the @compile tag can use the /ref=file option. Such tests are generally not recommended, since the output can be sensitive to the locale in which the are run, and may contain other details which may be hard to maintain, such as line numbers.

While not part of the tag specification, some tests use the string "/nodynamiccopyright/" after the @test tag to indicate that that the file should not be subject to automated copyright processing that might affect the operation of the test.