From f104525c71fbd6338e98050201253f2fe464ec9b Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 28 Jan 2021 23:14:30 +0900 Subject: mkmf: cpp_command in C++ mode --- test/mkmf/test_egrep_cpp.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test') diff --git a/test/mkmf/test_egrep_cpp.rb b/test/mkmf/test_egrep_cpp.rb index 7ac0e60010..2d10140368 100644 --- a/test/mkmf/test_egrep_cpp.rb +++ b/test/mkmf/test_egrep_cpp.rb @@ -10,4 +10,16 @@ class TestMkmfEgrepCpp < TestMkmf def test_not_have_func assert_equal(false, egrep_cpp(/never match/, ""), MKMFLOG) end + + class TestMkmfEgrepCxx < self + def test_cxx_egrep_cpp + assert_equal(true, MakeMakefile["C++"].egrep_cpp(/^ok/, <<~SRC), MKMFLOG) + #ifdef __cplusplus + ok + #else + #error not C++ + #endif + SRC + end + end end -- cgit v1.2.3