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.
Tested on:
- x86 32bits.
- x86 32bits (Fedora 14).
- x86 64bits (Ubuntu Lucid).
CREDITS
......
......@@ -390,11 +390,18 @@ func (self *testCase) testReaddir() {
self.tester.Errorf("readdir err %v", err)
}
if len(infos) != 2 {
self.tester.Errorf("infos mismatch %v", infos)
wanted := map[string] bool{
"hello.txt": true,
"subdir": true,
}
if len(wanted) != len(infos) {
self.tester.Errorf("Length mismatch %v", infos)
} else {
if infos[0].Name != "hello.txt" || infos[1].Name != "subdir" {
self.tester.Errorf("names incorrect %v", infos)
for _, v := range 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