Fix scandir test on Redox

This commit is contained in:
Jeremy Soller
2019-07-06 18:39:41 -06:00
parent 5c0b37a229
commit eae28f6dd9
2 changed files with 8 additions and 3 deletions
+8 -1
View File
@@ -17,7 +17,14 @@ int main(void) {
UNEXP_IF(scandir, len, < 0);
for(int i = 0; i < len; i += 1) {
puts(array[i]->d_name);
// TODO: Redox does not yet provide . or .. - so filter them out
// in order to make output match on all systems
if (
strcmp(array[i]->d_name, ".") != 0 &&
strcmp(array[i]->d_name, "..") != 0
) {
puts(array[i]->d_name);
}
free(array[i]);
}
free(array);
-2
View File
@@ -1,5 +1,3 @@
.
..
1-never-gonna-give-you-up
2-never-gonna-let-you-down
4-and-desert-you