#!/bin/sh
# Build and run a small program against the installed library.
set -e
cd "$AUTOPKGTEST_TMP"
cat > test.cpp <<'END'
#include <iostream>
#include <libgourou.h>

int main()
{
    gourou::ByteArray data(std::string("gourou"));
    std::string hex = data.toHex();
    std::cout << "libgourou " << LIBGOUROU_VERSION << ": " << hex << std::endl;
    return hex == "676f75726f75" ? 0 : 1;
}
END
g++ -o test test.cpp $(pkg-config --cflags --libs libgourou)
./test
