boxes/utest/global_mock.h
Thomas Jensen 4ae947ff99
Extend unit testing capabilities
- Structure unit tests into multiple modules
- Add setup/teardown of fixtures
- Add ability to capture and check stdout and stderr
- Add mock handling to Makefile
2021-10-28 09:01:14 +02:00

45 lines
1.2 KiB
C

/*
* boxes - Command line filter to draw/remove ASCII boxes around text
* Copyright (c) 1999-2021 Thomas Jensen and the boxes contributors
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License, version 2, as published
* by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*/
/*
* Test fixtures and mocks of global shared state.
*/
#ifndef GLOBAL_MOCK_H
#define GLOBAL_MOCK_H
extern char **collect_out;
extern int collect_out_size;
extern char **collect_err;
extern int collect_err_size;
void collect_reset();
void setup_mocks();
void teardown();
#endif
/*EOF*/ /* vim: set cindent sw=4: */