File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,24 @@ def test_uncommenting(self) -> None:
65
65
self .assertIn (b'void foo() {}' , bundled )
66
66
self .assertNotIn (b'void bar() {}' , bundled )
67
67
68
+ def test_without_extension (self ) -> None :
69
+ # .hppといった拡張子がないheader fileがinclude中に現れても正しく展開される事を確認
70
+
71
+ files = {
72
+ 'example.test.cpp' : b'#include "bar"\n #include "foo.hpp"' ,
73
+ 'bar' : b'#include "./bar.hpp"' ,
74
+ 'bar.hpp' : b'hello bar\n ' ,
75
+ 'foo.hpp' : b'hello foo\n ' ,
76
+ }
77
+ path = pathlib .Path ('example.test.cpp' )
78
+ with tests .utils .load_files (files ) as tempdir :
79
+ with tests .utils .chdir (tempdir ):
80
+ bundler = cplusplus_bundle .Bundler (iquotes = [tempdir ])
81
+ bundler .update (path )
82
+ res = bundler .get ()
83
+ self .assertIn (b'hello bar\n ' , res )
84
+ self .assertIn (b'hello foo\n ' , res )
85
+
68
86
@unittest .skipIf (shutil .which ('clang++' ) is None , 'clang++ is required for this test' )
69
87
def test_reject_clang (self ) -> None :
70
88
files = {
You can’t perform that action at this time.
0 commit comments