# HG changeset patch # User Rik # Date 1382808418 25200 # Node ID 26992c04d5dc635bc93c20045be5ea2582044d09 # Parent 7fc06bb4ab24c65119fd74f731b20aad08d32693 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. diff -r 7fc06bb4ab24 -r 26992c04d5dc test/bug-38691/bug-38691.tst --- a/test/bug-38691/bug-38691.tst Sat Oct 26 11:30:45 2013 +0200 +++ b/test/bug-38691/bug-38691.tst Sat Oct 26 10:26:58 2013 -0700 @@ -1,13 +1,18 @@ %!test -%! addpath dir1 -%! [d1_r, d1_f1, d1_f2, d1_f3] = func1 (0); -%! addpath dir2 -%! [d2_r, d2_f1, d2_f2, d2_f3] = func1 (0); -%! assert (d1_r, 0); -%! assert (d2_r, 1); -%! assert (d1_f1, "dir1/func1"); -%! assert (d1_f2, "dir1/func2"); -%! assert (d1_f3, "dir1/func3"); -%! assert (d2_f1, "dir2/func1"); -%! assert (d2_f2, "dir2/func2"); -%! assert (d2_f3, "dir2/func3"); +%! unwind_protect +%! addpath dir1; +%! [d1_r, d1_f1, d1_f2, d1_f3] = func1 (0); +%! addpath dir2; +%! [d2_r, d2_f1, d2_f2, d2_f3] = func1 (0); +%! assert (d1_r, 0); +%! assert (d2_r, 1); +%! assert (d1_f1, "dir1/func1"); +%! assert (d1_f2, "dir1/func2"); +%! assert (d1_f3, "dir1/func3"); +%! assert (d2_f1, "dir2/func1"); +%! assert (d2_f2, "dir2/func2"); +%! assert (d2_f3, "dir2/func3"); +%! unwind_protect_cleanup +%! rmpath dir1; +%! rmpath dir2; +%! end_unwind_protect