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