File tree Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+ #include <assert.h>
2
+ #include "complex.h"
3
+ #include <ctype.h>
4
+ #include "stdio.h"
5
+ #include <float.h>
6
+ #include "string.h"
7
+ #include "hey/sup/iomanip.h"
8
+ #include <Hey/ssup/math.h>
9
+ #include "hello/how/stdlib.h"
10
+ #include <great/wchar.h>
11
+ #include "stdbool.h"
12
+ #include <stdint.h>
13
+ #include "hello12"
14
+ #include <WsSup34>
15
+ #include <heyYo3-lol>
Original file line number Diff line number Diff line change
1
+ import os
2
+ from language .C import extract_libraries
3
+
4
+ def test_extract_libraries ():
5
+ dir_path = os .path .dirname (os .path .realpath (__file__ ))
6
+ files = ['fixtures/C.c' ]
7
+ fq_files = [os .path .join (dir_path , f ) for f in files ]
8
+ libs = extract_libraries (fq_files )
9
+ assert len (libs ) == 1
10
+
11
+ assert libs ['C' ] == [
12
+ "assert.h" ,
13
+ "complex.h" ,
14
+ "ctype.h" ,
15
+ "stdio.h" ,
16
+ "float.h" ,
17
+ "string.h" ,
18
+ "hey/sup/iomanip.h" ,
19
+ "Hey/ssup/math.h" ,
20
+ "hello/how/stdlib.h" ,
21
+ "great/wchar.h" ,
22
+ "stdbool.h" ,
23
+ "stdint.h" ,
24
+ "hello12" ,
25
+ "WsSup34" ,
26
+ "heyYo3-lol"
27
+ ]
You can’t perform that action at this time.
0 commit comments