diff --git a/tests/p_gcc-c++/0-install_gcc-c++.sh b/tests/p_gcc-c++/0-install_gcc-c++.sh new file mode 100755 index 0000000..2d62f48 --- /dev/null +++ b/tests/p_gcc-c++/0-install_gcc-c++.sh @@ -0,0 +1,5 @@ +#!/bin/bash +# Author: Dries Verachtert + +t_Log "$0 - installing gcc-c++" +t_InstallPackage gcc-c++ diff --git a/tests/p_gcc-c++/1-test_hello_world.sh b/tests/p_gcc-c++/1-test_hello_world.sh new file mode 100755 index 0000000..527cf02 --- /dev/null +++ b/tests/p_gcc-c++/1-test_hello_world.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# Author: Dries Verachtert + +t_Log "Running $0 - test gcc-c++ with a hello world program" + +CPPBINARY=`mktemp -q --suffix=.gcc-c++_test` + +cat < +int main(int argc, char** argv) { + std::cout << "Hello world!" << std::endl; +} +EOF + +$CPPBINARY | grep -q "Hello world" +t_CheckExitStatus $? + +rm -f $CPPBINARY