~niemeyer/gocheck/trunk

Viewing all changes in revision 81.

  • Committer: Gustavo Niemeyer
  • Author(s): John A Meinel
  • Date: 2013-03-01 20:20:38 UTC
  • mfrom: (59.1.2 gocheck)
  • Revision ID: gustavo@niemeyer.net-20130301202038-flaa69rc1kcegj5u
This fixes a bunch of failing tests on Windows.

Specifically, a lot of tests were asserting something like:

FAIL: filename.go ...

While on Windows, the full paths are given:

FAIL: C:/dev/go/gocheck/filename.go

I dug into it, and it turns out that nicePath was comparing
function.FileLine() to os.Getwd(). However, function.FileLine() returns
'C:/path/to/foo' while 'os.Getwd()' returns 'C:\path\to\foo'.

I also did one more quick change, which was to always append the trailing '/'.
That way we don't have to do that on every call to nicePath() (and I checked
that only nicePath uses initWD).

At the moment, there are only 2 remaining tests failing. Both because the
failure messages don't include the module name. This is with golang r58. So it
is possible that golang changed something (so it needs to be fixed anyway), or
it is possible it just works differently on Windows :(.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: