@@ -2291,34 +2291,31 @@ Deno.test("glob", async () => {
22912291 tempDir . join ( "test.txt" ) . writeTextSync ( "test\n" ) ;
22922292 tempDir . join ( "test2.txt" ) . writeTextSync ( "test2\n" ) ;
22932293 const combined = ( await $ `cat *.ts` . noThrow ( ) . captureCombined ( true ) ) . combined ;
2294- const err = combined
2295- . replaceAll ( tempDir . toString ( ) , "$TEMP_DIR" )
2296- . replaceAll ( tempDir . realPathSync ( ) . toString ( ) , "$TEMP_DIR" ) ;
2297- assertEquals ( err , "glob: no matches found '$TEMP_DIR/*.ts'\n" ) ;
2294+ assert (
2295+ combined . match ( / g l o b : n o m a t c h e s f o u n d ' [ ^ \' ] + \* \. t s ' \n / ) != null ,
2296+ combined ,
2297+ ) ;
22982298 } ) ;
22992299
23002300 await withTempDir ( async ( tempDir ) => {
23012301 tempDir . join ( "test.txt" ) . writeTextSync ( "test\n" ) ;
23022302 tempDir . join ( "test2.txt" ) . writeTextSync ( "test2\n" ) ;
23032303
23042304 const combined = ( await $ `cat [].ts` . noThrow ( ) . captureCombined ( true ) ) . combined ;
2305- const stderr = combined
2306- . replaceAll ( tempDir . toString ( ) , "$TEMP_DIR" )
2307- . replaceAll ( tempDir . realPathSync ( ) . toString ( ) , "$TEMP_DIR" ) ;
2308- assertEquals (
2309- stderr ,
2310- `glob: no matches found '$TEMP_DIR/[].ts'\n` ,
2305+ assert (
2306+ combined . match ( / g l o b : n o m a t c h e s f o u n d ' [ ^ \' ] + \. t s ' \n / ) != null ,
2307+ combined ,
23112308 ) ;
23122309 } ) ;
23132310
23142311 await withTempDir ( async ( tempDir ) => {
23152312 tempDir . join ( "test.txt" ) . writeTextSync ( "test\n" ) ;
23162313 tempDir . join ( "test2.txt" ) . writeTextSync ( "test2\n" ) ;
23172314 const combined = ( await $ `cat *.ts || echo 2` . noThrow ( ) . captureCombined ( true ) ) . combined ;
2318- const replaced = combined
2319- . replaceAll ( tempDir . toString ( ) , "$TEMP_DIR" )
2320- . replaceAll ( tempDir . realPathSync ( ) . toString ( ) , "$TEMP_DIR" ) ;
2321- assertEquals ( replaced , "glob: no matches found '$TEMP_DIR/*.ts'\n2\n" ) ;
2315+ assert (
2316+ combined . match ( / g l o b : n o m a t c h e s f o u n d ' [ ^ \' ] + \* \. t s ' \n 2 \n / ) != null ,
2317+ combined ,
2318+ ) ;
23222319 } ) ;
23232320
23242321 await withTempDir ( async ( tempDir ) => {
0 commit comments