cocci.inria.fr archive mirror
 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

* Re: [Cocci] [PATCH] --c++ --test will assume .cpp extension, not .c
  2019-06-26  5:50 [Cocci] [PATCH] --c++ --test will assume .cpp extension, not .c Michele Martone
@ 2019-06-26  6:04 ` Julia Lawall
  0 siblings, 0 replies; 2+ messages in thread
From: Julia Lawall @ 2019-06-26  6:04 UTC (permalink / raw)
  To: Michele Martone; +Cc: cocci



On Wed, 26 Jun 2019, Michele Martone wrote:

> --c++ --test will assume .cpp extension, not .c
>
> Signed-off-by: Michele Martone <michelemartone@users.sf.net>

Applied, thanks.

julia

> ---
> 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
>
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

^ permalink raw reply	[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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).