File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
src/arduino.cc/builder/test Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -148,3 +148,21 @@ func TestIncludesFinderWithRegExpPaddedIncludes3(t *testing.T) {
148
148
sort .Strings (includes )
149
149
require .Equal (t , "SPI.h" , includes [0 ])
150
150
}
151
+
152
+ func TestIncludesFinderWithRegExpPaddedIncludes4 (t * testing.T ) {
153
+ ctx := & types.Context {}
154
+
155
+ output := "In file included from /tmp/arduino_modified_sketch_815412/binouts.ino:52:0:\n " +
156
+ "/tmp/arduino_build_static/sketch/regtable.h:31:22: fatal error: register.h: No such file or directory\n "
157
+
158
+ ctx .Source = output
159
+
160
+ parser := builder.IncludesFinderWithRegExp {Source : & ctx .Source }
161
+ err := parser .Run (ctx )
162
+ NoError (t , err )
163
+
164
+ includes := ctx .Includes
165
+ require .Equal (t , 1 , len (includes ))
166
+ sort .Strings (includes )
167
+ require .Equal (t , "register.h" , includes [0 ])
168
+ }
You can’t perform that action at this time.
0 commit comments