# HG changeset patch # User Rik # Date 1292293875 28800 # Node ID cbf58e4b5f4ec225bf38091a632ab4f2ad3a9cbd # Parent 5ea2644b0111b10d3f648fa4ce90fd23633360d3 Add test for switch statement with otherwise clause, but no cases. diff -r 5ea2644b0111 -r cbf58e4b5f4e test/ChangeLog --- a/test/ChangeLog Mon Dec 13 21:09:09 2010 -0500 +++ b/test/ChangeLog Mon Dec 13 18:31:15 2010 -0800 @@ -1,3 +1,8 @@ +2010-12-13 Rik + + * test_switch.m : Add test for switch statement with otherwise clause, + but no cases. + 2010-11-10 John W. Eaton * fntests.m: Set warning state off for Octave:deprecated-functions. diff -r 5ea2644b0111 -r cbf58e4b5f4e test/test_switch.m --- a/test/test_switch.m Mon Dec 13 21:09:09 2010 -0500 +++ b/test/test_switch.m Mon Dec 13 18:31:15 2010 -0800 @@ -73,6 +73,17 @@ %! %! assert(all (x == [0, 1, 0, 0])); +%!test +%! a = 1; +%! +%! switch 1 +%! otherwise +%! a = 2; +%! endswitch +%! +%! assert(a == 2); + + %% test/octave.test/switch/switch-4.m %!error eval("switch endswitch");