Skip to content

File tests fail on Windows 7 #11

@oconnor0

Description

@oconnor0

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions