Make tests public. Rewrite most tests. Add tests.
[pintos-anon] / src / tests / filesys / extended / dir-rm-cwd-cd.ck
1 # -*- perl -*-
2 use strict;
3 use warnings;
4 use tests::tests;
5 check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF', <<'EOF']);
6 (dir-rm-cwd-cd) begin
7 (dir-rm-cwd-cd) mkdir "a"
8 (dir-rm-cwd-cd) chdir "a"
9 (dir-rm-cwd-cd) remove "/a" (must not crash)
10 (dir-rm-cwd-cd) chdir "/a" (remove succeeded so this must return false)
11 (dir-rm-cwd-cd) end
12 EOF
13 (dir-rm-cwd-cd) begin
14 (dir-rm-cwd-cd) mkdir "a"
15 (dir-rm-cwd-cd) chdir "a"
16 (dir-rm-cwd-cd) remove "/a" (must not crash)
17 (dir-rm-cwd-cd) chdir "/a" (remove failed so this must succeed)
18 (dir-rm-cwd-cd) end
19 EOF