[PATCH v2] testsuite: prune DOS drive letter in test outputs

Clément Chigot chigot@adacore.com
Thu Feb 23 08:01:25 GMT 2023


On Wed, Feb 22, 2023 at 5:37 PM Andreas Schwab <schwab@suse.de> wrote:
>
> On Feb 22 2023, Clément Chigot wrote:
>
> > It seems that both are working.
> >   | $ cat ~/tmp/test.tcl
> >   | set output "C:\\home\\c"
> >   | regsub -all "(^|\n)\[\[:upper:\]\]:(/|\)" $output "\\1\\2" output
> >   | puts $output
> >   | regsub -all "(^|\n)\[\[:upper:\]\]:(/|\\\\)" $output "\\1\\2" output
> >   | puts $output
> >
> >   | $ tclsh8.6 ~/tmp/test.tcl
> >   | \home\c
> >   | \home\c
>
> The first regexp is equivalent to {(^|\n)[[:upper:]]:(/|)}, and the
> second group matches the empty string.

Yeah indeed, you're right !
So just to be sure before submitted a new patch version,
"(^|\n)\[\[:alpha:\]\]:(/|\\\\)" is correct ? (I've changed upper by
alpha as it's supposed to be).

Thanks a lot for your help
Clément


More information about the Binutils mailing list