Commit dae7538a authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Make readdir() test order independent.

Add x86_64 to tested platforms.
parent 32ca2d1e
...@@ -22,8 +22,8 @@ functionality. ...@@ -22,8 +22,8 @@ functionality.
Tested on: Tested on:
- x86 32bits. - x86 32bits (Fedora 14).
- x86 64bits (Ubuntu Lucid).
CREDITS CREDITS
......
...@@ -390,11 +390,18 @@ func (self *testCase) testReaddir() { ...@@ -390,11 +390,18 @@ func (self *testCase) testReaddir() {
self.tester.Errorf("readdir err %v", err) self.tester.Errorf("readdir err %v", err)
} }
if len(infos) != 2 { wanted := map[string] bool{
self.tester.Errorf("infos mismatch %v", infos) "hello.txt": true,
"subdir": true,
}
if len(wanted) != len(infos) {
self.tester.Errorf("Length mismatch %v", infos)
} else { } else {
if infos[0].Name != "hello.txt" || infos[1].Name != "subdir" { for _, v := range infos {
self.tester.Errorf("names incorrect %v", infos) _, ok := wanted[v.Name]
if !ok {
self.tester.Errorf("Unexpected name %v", v.Name)
}
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment