Generalize command-line test output file checking
commit2a57fccff03c570ea01dc2816a6a81c356ccd4ee
authorTeemu Murtola <teemu.murtola@gmail.com>
Mon, 24 Apr 2017 15:34:29 +0000 (24 18:34 +0300)
committerTeemu Murtola <teemu.murtola@gmail.com>
Thu, 11 May 2017 14:48:08 +0000 (11 16:48 +0200)
tree832d44cb4986b154679e95a08fe69c3df3f09c95
parenta9aada0a3bb8aede1fa51166b951adfa2595a45b
Generalize command-line test output file checking

Add a separate interface that gets passed a path to the temporary file
created by the program under test, instead of only supporting checking a
TextInputStream.  This makes it possible 1) to use old I/O routines such
as read_tps_conf() for the checks, and 2) to support binary files.

For now, all existing matchers still use streams; any matcher using the
old interface can be wrapped in the new implementation, and overloads
for setOutputFile() exist that do just that.  At least conftest.h could
be easily generalized with the new approach quite a bit.

Change-Id: Ibe71e22e568a54044d5fe64f88c43bb60cc530cb
src/testutils/CMakeLists.txt
src/testutils/cmdlinetest.cpp
src/testutils/cmdlinetest.h
src/testutils/filematchers.cpp [new file with mode: 0644]
src/testutils/filematchers.h [new file with mode: 0644]