munificent/magpie — Issue #11: File tests fail on Windows 7
Author: oconnor0
Created: 2011-10-13 20:03:21+00:00
State: open

Running the `spec\_init.mag` tests on Windows 7 (I assume other versions would have similar issues) reports 13 failed tests. It appears that my `spec\lib\io\test_file.txt` has `\r\n` as the newlines; I assume from Git. And the backslashes instead of forward slashes are a wonderful feature of Windows.

```
Executing specification...
FAIL: The method (file is File) read() should return the entire contents of the file.
Expected one\ntwo\nthree but was one\r\ntwo\r\nthree
FAIL: The method (path is String) dirName should return all the components of filename except the last one.
Expected /dir but was \dir
Expected /path/to but was \path\to
Expected /foo but was \foo
FAIL: The method (path is String) dirName should ignore a trailing '/'.
Expected /foo but was \foo
FAIL: The method (path is String) dirName should handle edge cases.
Expected ./b but was .\b
Expected / but was \
Expected / but was \
Expected /foo but was \foo
Expected /foo but was \foo
Expected /foo/.. but was \foo\..
FAIL: The method execute(command is String) should Return a record of the output and exit code.
Expected out: "hi\n", exit: 0 but was out: "hi\r\n", exit: 0
FAIL: The method executeOutput(command is String) should Return the output.
Expected hi\n but was hi\r\n

Passed 552 out of 565 tests in 366ms.
```