Fri 12 Oct 2012 12:34:44 AM UTC, original submission:
Data: Ubuntu 12.04 32bit on Intel Core i5, using Octave dev sources.
The function octave/scripts/strings/strsplit.m fails a test during "make check". I'm not sure why this cropped up suddenly today. Here's the output from test/fntests.log:
***** assert (strsplit (["a,bc";",de"], ","), {"a", "bc", ones(1,0), "de "})
!!!!! test failed
assert (strsplit (["a,bc"; ",de"], ","),{"a", "bc", ones(1, 0), "de "}) expected
{
[1,1] = a
[1,2] = bc
[1,3] = [](1x0)
[1,4] = de
}
but got
{
[1,1] = a
[1,2] = bc
[1,3] =
[1,4] = de
}
It turns out that strsplit is returning a 1x0 character array, which doesn't equate to the 1x0 numeric array specified in the assertion.
Fix: I eliminated the test error by changing "ones(1,0)" to "char(ones(1,0))" in the assert statement. Alternatively "repmat(' ',1,0)" also works. Changing the test to make the RHS be a 1x0 character array in any manner fixes the test. My actual code that uses strsplit is unaffected by the bug.
|