@@ -155,11 +155,15 @@ func TestResetStatCacheWhenFollowingSymlink(t *testing.T) {
155
155
156
156
func TestIsInsideDir (t * testing.T ) {
157
157
notInside := func (a , b * Path ) {
158
- require .False (t , a .IsInsideDir (b ), "%s is inside %s" , a , b )
158
+ isInside , err := a .IsInsideDir (b )
159
+ require .NoError (t , err )
160
+ require .False (t , isInside , "%s is inside %s" , a , b )
159
161
}
160
162
161
163
inside := func (a , b * Path ) {
162
- require .True (t , a .IsInsideDir (b ), "%s is inside %s" , a , b )
164
+ isInside , err := a .IsInsideDir (b )
165
+ require .NoError (t , err )
166
+ require .True (t , isInside , "%s is inside %s" , a , b )
163
167
notInside (b , a )
164
168
}
165
169
@@ -377,7 +381,9 @@ func TestWriteToTempFile(t *testing.T) {
377
381
defer tmp .Remove ()
378
382
require .NoError (t , err )
379
383
require .True (t , strings .HasPrefix (tmp .Base (), "prefix" ))
380
- require .True (t , tmp .IsInsideDir (tmpDir ))
384
+ isInside , err := tmp .IsInsideDir (tmpDir )
385
+ require .NoError (t , err )
386
+ require .True (t , isInside )
381
387
data , err := tmp .ReadFile ()
382
388
require .NoError (t , err )
383
389
require .Equal (t , tmpData , data )
0 commit comments