diff options
author | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2008-08-04 15:49:44 +0000 |
---|---|---|
committer | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2008-08-04 15:49:44 +0000 |
commit | 69f127c63f477f800e2a2d4068334823f36a78a3 (patch) | |
tree | f2b7b447f7c3c8a7f530aaf9a2310efa543b4513 /tests | |
parent | a4403ac6676e277bf233e12f32da85b4a3e22e61 (diff) |
a test for [list2lists]
svn path=/trunk/externals/zexy/; revision=10236
Diffstat (limited to 'tests')
-rw-r--r-- | tests/list2lists/negativelength.pd | 50 | ||||
-rw-r--r-- | tests/runtests.txt | 2 |
2 files changed, 52 insertions, 0 deletions
diff --git a/tests/list2lists/negativelength.pd b/tests/list2lists/negativelength.pd new file mode 100644 index 0000000..8b249ad --- /dev/null +++ b/tests/list2lists/negativelength.pd @@ -0,0 +1,50 @@ +#N canvas 57 57 608 610 10; +#X obj 86 213 t b b; +#X obj 86 190 inlet run_test; +#X obj 86 488 outlet; +#X msg 86 420 0; +#X obj 86 455 t f; +#X obj 134 327 list2lists; +#X msg 134 276 1 2 3 4; +#X text 73 33 currently [list2lists] does not check for negative list +lengths and allows them just fine \, which can easily lead to segfaults +(e.g. with a list-length of "-8000"); +#X text 76 90 i don't knw exactly how this should be handled; +#X text 125 114 i guess it would be best to just issue an error and +clamp the list-length to 0; +#X msg 201 305 list 2 -2 2; +#X text 223 333 the wrong output will be "1 2 \, bang \, 1 2"; +#X msg 147 226 bang; +#X obj 134 351 route bang; +#X obj 134 252 t b b b; +#X obj 123 406 repack 100; +#X msg 134 376 symbol BANG; +#X obj 123 429 unpack 0 0 s 0 0; +#X obj 203 476 +; +#X obj 206 500 != 0; +#X floatatom 128 511 5 0 0 0 - - -; +#X obj 203 454 == 3; +#X obj 243 450 == 4; +#X connect 0 0 3 0; +#X connect 0 1 14 0; +#X connect 1 0 0 0; +#X connect 3 0 4 0; +#X connect 4 0 2 0; +#X connect 4 0 20 0; +#X connect 5 0 13 0; +#X connect 6 0 5 0; +#X connect 10 0 5 1; +#X connect 12 0 14 0; +#X connect 13 0 16 0; +#X connect 13 1 15 0; +#X connect 14 0 15 0; +#X connect 14 1 6 0; +#X connect 14 2 10 0; +#X connect 15 0 17 0; +#X connect 16 0 15 0; +#X connect 17 3 21 0; +#X connect 17 4 22 0; +#X connect 18 0 19 0; +#X connect 19 0 4 0; +#X connect 21 0 18 0; +#X connect 22 0 18 1; diff --git a/tests/runtests.txt b/tests/runtests.txt index 11cc358..f461f03 100644 --- a/tests/runtests.txt +++ b/tests/runtests.txt @@ -70,12 +70,14 @@ help-msg/zexy_; help-msg/z~; l2s/argument; l2s/delimiter; +list2lists/negativelength; lister/inline2; lister/inline; msgfile/empty_at_end; msgfile/emptyreplace; msgfile/loadingCR; msgfile/loading; +msgfile/prev_from_end; msgfile/reentrant; repeat/noargs; s2l/numsymbols; |