monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] tests/automate_get_workspace_root broken on MinGW


From: Timothy Brownawell
Subject: Re: [Monotone-devel] tests/automate_get_workspace_root broken on MinGW
Date: Sat, 24 May 2008 12:48:27 -0500

On Sat, 2008-05-24 at 12:51 -0400, Stephen Leake wrote:
> tests/automate_get_workspace_root/__driver__.lua does:
> 
> check(indir("foo",mtn("automate", "get_workspace_root")), 0, true, false)
> check(qgrep("^"..cwd.."$", "stdout"))
> 
> That breaks on MinGW; the directory path has backslashes in it, which
> should be escaped.
> 
> I couldn't find a 'quote_regexp' Lua function, nor did a quick search
> find one in pcre/*. 
> 
> Anyway this seems simpler:
> 
> check(cwd .. '\n' == readfile("stdout"))
> 
> Is there a reason to prefer 'qgrep' over ' == readfile()'?

For automate we generally want *exact* output, so readfile() is more
correct. qgrep would be more for checking non-automate commands, which
tend to have pretty formatting and human-targeted extra chatter that's
OK to change.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]