@@ -288,14 +288,19 @@ system:
288288 require .Len (t , rootCfg .Resources , 1 )
289289 require .Equal (t , "/test" , rootCfg .Resources [0 ].Path )
290290
291- // Check sub-directory config paths
291+ // Check subdirectory config paths
292292 require .Len (t , subCfg .Resources , 2 )
293293 require .Equal (t , "/api/v1/users" , subCfg .Resources [0 ].Path )
294- require .Equal (t , "api/v1/users-response.json" , subCfg .Resources [0 ].Response .File )
295- require .Equal (t , "api/v1/static-content" , subCfg .Resources [1 ].Response .Dir )
294+ require .Equal (t , normalisePathToCurrentOs ( "api/v1/users-response.json" ) , subCfg .Resources [0 ].Response .File )
295+ require .Equal (t , normalisePathToCurrentOs ( "api/v1/static-content" ) , subCfg .Resources [1 ].Response .Dir )
296296
297297 // Check system store preload file path
298- require .Equal (t , "api/v1/user-db.json" , subCfg .System .Stores ["users" ].PreloadFile )
298+ require .Equal (t , normalisePathToCurrentOs ("api/v1/user-db.json" ), subCfg .System .Stores ["users" ].PreloadFile )
299+ }
300+
301+ // normalisePathToCurrentOs normalises the file path to use the current OS's path separator.
302+ func normalisePathToCurrentOs (path string ) string {
303+ return filepath .FromSlash (path )
299304}
300305
301306func TestLoadConfig_WithInterceptors (t * testing.T ) {
0 commit comments