summaryrefslogtreecommitdiffstats
path: root/vespalib/src/tests/testapp-state/testapp-state.cpp
blob: cf6ced914d495b981c82e70861cb26f496635ad7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/fastos/fastos.h>
#include <vespa/vespalib/testkit/test_kit.h>

using namespace vespalib;

TEST_MAIN() {
    system("./vespalib_state_test_app > out.txt 2>&1 out.txt");
    system("cat out.txt | grep STATE | sed 's/([^)].*\\//(/' > actual.txt");

    std::string diff_cmd("diff -u actual.txt ");
    diff_cmd += TEST_PATH("expect.txt");
    EXPECT_EQUAL(system(diff_cmd.c_str()), 0);
}