Sun 10 Oct 2010 05:55:44 PM UTC, original submission:
Hi,
$ hg tip
changeset: 11095:d4619eb6ef8e
but it also happens on 3.2.4
System: Debian Linux
The way test() checks for the files to test doesn't work when a package uses classes. The following is from the 'general' package. The problem seems to be that test() uses the loadpath to find the function file, but the directory @dict is not added to the loadpath:
octave:1> pkg list
Package Name | Version | Installation directory
--------------+---------+-----------------------
general *| 1.2.2 | /opt/octave/share/octave/packages/general-1.2.2
octave:2> path
.
/opt/octave/libexec/octave/packages/general-1.2.2/x86_64-unknown-linux-gnu-api-v40+
/opt/octave/share/octave/packages/general-1.2.2
/opt/octave/libexec/octave/3.3.52+/site/oct/x86_64-unknown-linux-gnu
<snip>
octave:3> help dict
`dict' is a function from the file /opt/octave/share/octave/packages/general-1.2.2/@dict/dict.m
octave:4> test dict
????? dict does not exist in path
octave:5> cd /opt/octave/share/octave/packages/general-1.2.2/@dict/
octave:6> test dict
error: sq_string cannot be indexed with .
error: evaluating argument list element number 1
error: called from:
error: /opt/octave/share/octave/packages/general-1.2.2/@dict/isempty.m at line 26, column 6
error: /opt/octave/share/octave/3.3.52+/m/testfun/test.m at line 97, column 3
Copying the file into another directory and running it from there works:
octave:2> test dict.m
PASSES 1 out of 1 tests
So, the contenct of dict.m is not to blame.
|