g_test_dbus: double output when piping
When using the glib test_dbus the output of all fpriptf's look fine, until you start piping them to another program. When you do that, some lines will appear twice in the output. Once in the right place and once more at the end of the output. I use greatest
for as a testing framework. I haven't had the time to test if this happens without greatest.
Here's the important code that needs to be in one of the tests:
GTestDBus *dbus_bus;
g_test_dbus_unset();
dbus_bus = g_test_dbus_new(G_TEST_DBUS_NONE);
g_test_dbus_up(dbus_bus);
The output will look like this
make test | cat
Before the dbus suite
* Suite suite_dbus:
After the dbus suite
Total: 0 tests (668 ticks, 0.001 sec), 0 assertions
Pass: 0, fail: 0, skip: 0.
Before the dbus suite
* Suite suite_dbus:
instead of the expected
make test
Before the dbus suite
* Suite suite_dbus:
After the dbus suite
Total: 0 tests (748 ticks, 0.001 sec), 0 assertions
Pass: 0, fail: 0, skip: 0.
See https://github.com/silentbicycle/greatest/issues/106 for the issue I reported to greatest.