HomeFreeBSD

Integrate indent tests added in r313544 into ATF/Kyua and the FreeBSD

Description

Integrate indent tests added in r313544 into ATF/Kyua and the FreeBSD
test suite

This change does the following:

  • Introduces symmetry in the test inputs/outputs by adding the exit code to the files. This simplified the test driver notably by requiring less filename/test name manipulation.
  • Adds a test driver for the testcases added in r313544, patterned after bin/sh/tests/functional_test.sh . The driver calls indent as noted in r313544, with an exception: The $FreeBSD$ RCS keyword's expansion is reindented with indent, which means that the output differs from the expected output. Thus, all lines with $FreeBSD$ in them are deleted on the fly, both in the input file and the output file.

    The test inputs/outputs are copied to the kyua sandbox before the test is run as the pathing in some of the files relies on pathing normalized to the current directory (copying the files is the easiest way to resolve the issue).

Approved by: pstef (maintainer)
Reviewed by: pstef
X-MFC with: r313544
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D9682