Mercurial > octave-nkf
comparison test/bug-38691/bug-38691.tst @ 17767:26992c04d5dc
bug-38691.tst: Clean up after test and remove dirs temporarily added to path.
* test/bug-38691/bug-38691.tst: Clean up after test and remove dirs temporarily
added to path.
author | Rik <rik@octave.org> |
---|---|
date | Sat, 26 Oct 2013 10:26:58 -0700 |
parents | 2f8fb02a6c31 |
children |
comparison
equal
deleted
inserted
replaced
17766:7fc06bb4ab24 | 17767:26992c04d5dc |
---|---|
1 %!test | 1 %!test |
2 %! addpath dir1 | 2 %! unwind_protect |
3 %! [d1_r, d1_f1, d1_f2, d1_f3] = func1 (0); | 3 %! addpath dir1; |
4 %! addpath dir2 | 4 %! [d1_r, d1_f1, d1_f2, d1_f3] = func1 (0); |
5 %! [d2_r, d2_f1, d2_f2, d2_f3] = func1 (0); | 5 %! addpath dir2; |
6 %! assert (d1_r, 0); | 6 %! [d2_r, d2_f1, d2_f2, d2_f3] = func1 (0); |
7 %! assert (d2_r, 1); | 7 %! assert (d1_r, 0); |
8 %! assert (d1_f1, "dir1/func1"); | 8 %! assert (d2_r, 1); |
9 %! assert (d1_f2, "dir1/func2"); | 9 %! assert (d1_f1, "dir1/func1"); |
10 %! assert (d1_f3, "dir1/func3"); | 10 %! assert (d1_f2, "dir1/func2"); |
11 %! assert (d2_f1, "dir2/func1"); | 11 %! assert (d1_f3, "dir1/func3"); |
12 %! assert (d2_f2, "dir2/func2"); | 12 %! assert (d2_f1, "dir2/func1"); |
13 %! assert (d2_f3, "dir2/func3"); | 13 %! assert (d2_f2, "dir2/func2"); |
14 %! assert (d2_f3, "dir2/func3"); | |
15 %! unwind_protect_cleanup | |
16 %! rmpath dir1; | |
17 %! rmpath dir2; | |
18 %! end_unwind_protect |