Commit 3caf511
committed
fix: Don't smush macros which have an escaped empty line at the end
nanopb has a habit of generating macros which end with an escaped empty line (for example for messages which are empty). They look like this:
#define some_msg_t_FIELDLIST(X, a) \
#define some_msg_t_CALLBACK NULL
This caused CMock to strip all of the newlines after the backslash instead of only one, which the backslash was escaping.
This in turn caused both the macros to be in one line, causing a compile error in the generated mock.1 parent 379a9a8 commit 3caf511
File tree
2 files changed
+15
-1
lines changed- lib
- test/unit
2 files changed
+15
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
| 140 | + | |
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2867 | 2867 | | |
2868 | 2868 | | |
2869 | 2869 | | |
| 2870 | + | |
| 2871 | + | |
| 2872 | + | |
| 2873 | + | |
| 2874 | + | |
| 2875 | + | |
| 2876 | + | |
| 2877 | + | |
| 2878 | + | |
| 2879 | + | |
| 2880 | + | |
| 2881 | + | |
| 2882 | + | |
| 2883 | + | |
2870 | 2884 | | |
2871 | 2885 | | |
0 commit comments