Previously, a space would not be added after the * const. Add a test case for testing spacing with use of the type.
Signed-off-by: Jaskaran Singh <[email protected]> --- tests/ptrconstptr.c | 3 +++ tests/ptrconstptr.cocci | 7 +++++++ tests/ptrconstptr.res | 3 +++ 3 files changed, 13 insertions(+) create mode 100644 tests/ptrconstptr.c create mode 100644 tests/ptrconstptr.cocci create mode 100644 tests/ptrconstptr.res diff --git a/tests/ptrconstptr.c b/tests/ptrconstptr.c new file mode 100644 index 00000000..a2a3cf71 --- /dev/null +++ b/tests/ptrconstptr.c @@ -0,0 +1,3 @@ +void main() { + const char * const * x; +} diff --git a/tests/ptrconstptr.cocci b/tests/ptrconstptr.cocci new file mode 100644 index 00000000..030bc024 --- /dev/null +++ b/tests/ptrconstptr.cocci @@ -0,0 +1,7 @@ +@@ +type t; +@@ +void main() { +- t x; ++ t y; +} diff --git a/tests/ptrconstptr.res b/tests/ptrconstptr.res new file mode 100644 index 00000000..f5b2210c --- /dev/null +++ b/tests/ptrconstptr.res @@ -0,0 +1,3 @@ +void main() { + const char *const *y; +} -- 2.21.1 _______________________________________________ Cocci mailing list [email protected] https://systeme.lip6.fr/mailman/listinfo/cocci
