diff --git a/test/blackbox-tests/test-cases/cxx-flags.t/run.t b/test/blackbox-tests/test-cases/cxx-flags.t/run.t index 6e7bd03e1490..ce930351696b 100644 --- a/test/blackbox-tests/test-cases/cxx-flags.t/run.t +++ b/test/blackbox-tests/test-cases/cxx-flags.t/run.t @@ -2,24 +2,15 @@ > (lang dune 2.8) > EOF + $ GCCF="-x c++ -lstdc++ -shared-libgcc" + $ ClangF="-x c++" + $ MsvcF="/TP" + Default: add_cxx_flags = false - $ dune rules baz.o | sed -n -e '/(action/,$p' | - > sed 's#'$(opam config var prefix)'#OPAM_PREFIX#' - (action - (chdir - _build/default - (run - /usr/bin/cc - -O2 - -fno-strict-aliasing - -fwrapv - -g - -I - OPAM_PREFIX/lib/ocaml - -o - baz.o - -c - baz.cpp)))) + $ dune rules baz.o | tr -s '\n' ' ' | + > grep -ce "$GCCF\|$ClangF|$MsvcF" + 0 + [1] With add_cxx_flags = false @@ -28,23 +19,10 @@ With add_cxx_flags = false > (new_foreign_flags_handling false) > EOF - $ dune rules baz.o | sed -n -e '/(action/,$p' | - > sed 's#'$(opam config var prefix)'#OPAM_PREFIX#' - (action - (chdir - _build/default - (run - /usr/bin/cc - -O2 - -fno-strict-aliasing - -fwrapv - -g - -I - OPAM_PREFIX/lib/ocaml - -o - baz.o - -c - baz.cpp)))) + $ dune rules baz.o | tr -s '\n' ' ' | + > grep -ce "$GCCF\|$ClangF|$MsvcF" + 0 + [1] With add_cxx_flags = true $ cat >dune-project < (new_foreign_flags_handling true) > EOF - $ dune rules baz.o | sed -n -e '/(action/,$p' | - > sed 's#'$(opam config var prefix)'#OPAM_PREFIX#' - (action - (chdir - _build/default - (run - /usr/bin/cc - -x - c++ - -O2 - -fno-strict-aliasing - -fwrapv - -g - -I - OPAM_PREFIX/lib/ocaml - -o - baz.o - -c - baz.cpp)))) + $ dune rules baz.o | tr -s '\n' ' ' | + > grep -ce "$GCCF\|$ClangF|$MsvcF" + 1 $ dune exec ./main.exe 2046