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.



_______________________________________________
Monotone-devel mailing list
Monotone-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/monotone-devel

Reply via email to