Skip to content

Commit d710c0d

Browse files
committed
test: added test for bug #777
1 parent f4df820 commit d710c0d

File tree

5 files changed

+31
-0
lines changed

5 files changed

+31
-0
lines changed

ci/run_tests.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ pushd preprocess_cpp
138138
"$fpm" build
139139
popd
140140

141+
pushd preprocess_cpp_c
142+
"$fpm" run
143+
popd
144+
141145
pushd preprocess_hello
142146
"$fpm" build
143147
popd
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#include <stdio.h>
2+
3+
#include "val.h"
4+
5+
int main() { printf("%d\n", variable); }
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name = "preprocess_cpp_c"
2+
3+
[library]
4+
include-dir = ["src"]
5+
6+
[[executable]]
7+
name = "main"
8+
main = "main.c"
9+
10+
[preprocess]
11+
[preprocess.cpp]
12+
macros = ["VAL"]
13+
suffixes = ["F90", "f90", "h", "c"]
14+
directories = ["src", "app"]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#include "val.h"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#ifndef _VAL_H_
2+
#define _VAL_H_
3+
4+
#ifdef VAL
5+
const int variable = 1;
6+
#endif
7+
#endif

0 commit comments

Comments
 (0)