All of lore.kernel.org
 help / color / mirror / Atom feed
* [Cocci] [PATCH] --c++ --test will assume .cpp extension, not .c
@ 2019-06-26  5:50 Michele Martone
  2019-06-26  6:04 ` Julia Lawall
  0 siblings, 1 reply; 2+ messages in thread
From: Michele Martone @ 2019-06-26  5:50 UTC (permalink / raw)
  To: cocci

--c++ --test will assume .cpp extension, not .c

Signed-off-by: Michele Martone <michelemartone@users.sf.net>
---
diff --git a/testing.ml b/testing.ml
index 258e6c6f..784040fe 100644
--- a/testing.ml
+++ b/testing.ml
@@ -97,7 +97,7 @@ let testone prefix x compare_with_expected =
   let x    = if x =~ "\\(.*\\)_ver0$" then matched1 x else x in
   let base = if x =~ "\\(.*\\)_ver[0-9]+$" then matched1 x else x in

-  let cfile      = prefix ^ x ^ ".c" in
+  let cfile      = if !Flag.c_plus_plus then prefix ^ x ^ ".cpp" else prefix ^ x ^ ".c" in
   let cocci_file = prefix ^ base ^ ".cocci" in

   let expected_out = prefix ^ base ^ out_suffix in

_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-06-26  6:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-26  5:50 [Cocci] [PATCH] --c++ --test will assume .cpp extension, not .c Michele Martone
2019-06-26  6:04 ` Julia Lawall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.