aboutsummaryrefslogtreecommitdiff
path: root/tests/msgfile/prev_from_end.pd
diff options
context:
space:
mode:
Diffstat (limited to 'tests/msgfile/prev_from_end.pd')
-rw-r--r--tests/msgfile/prev_from_end.pd66
1 files changed, 66 insertions, 0 deletions
diff --git a/tests/msgfile/prev_from_end.pd b/tests/msgfile/prev_from_end.pd
new file mode 100644
index 0000000..442413a
--- /dev/null
+++ b/tests/msgfile/prev_from_end.pd
@@ -0,0 +1,66 @@
+#N canvas 57 57 869 598 10;
+#X obj 86 240 inlet run_test;
+#X obj 86 538 outlet;
+#X obj 182 357 t a a;
+#X obj 182 427 spigot;
+#X msg 245 387 1;
+#X msg 182 490 1;
+#X msg 106 470 0;
+#X msg 182 338 prev;
+#X msg 237 245 bang;
+#X obj 86 505 i;
+#X obj 86 263 t b b b;
+#X obj 182 468 select 2;
+#X msg 235 491 0;
+#X msg 273 364 \$1;
+#X msg 228 306 clear \, add 1 \, add 2 \, rewind \, end \, bang;
+#X symbolatom 273 345 10 0 0 0 - - -;
+#X obj 182 406 t a a;
+#X obj 182 386 msgfile;
+#X obj 195 523 t f f;
+#X obj 234 546 print inter;
+#X msg 257 408 0;
+#X text 80 104 this test seeks to the end of a msgfile and then beyond
+this end (which should stay at the end).;
+#X text 81 134 it then tries to read the "previous" line in the msgfile
+(that is: the last real line);
+#X floatatom 150 545 5 0 0 0 - - -;
+#X obj 182 280 t b b b b;
+#X obj 349 459 print __;
+#X obj 182 447 t a a;
+#X msg 359 362 clear \, add 1 \, add 2 \, rewind \, end;
+#X msg 320 395 bang;
+#X text 83 48 bug to detect: when [msgfile] has reached the "end"of
+its buffer \, it cannot access the previous elements any more;
+#X text 54 32 BUG:;
+#X text 55 91 TEST:;
+#X connect 0 0 10 0;
+#X connect 2 0 17 0;
+#X connect 3 0 26 0;
+#X connect 4 0 3 1;
+#X connect 5 0 18 0;
+#X connect 6 0 9 1;
+#X connect 7 0 2 0;
+#X connect 8 0 10 0;
+#X connect 9 0 1 0;
+#X connect 9 0 23 0;
+#X connect 10 0 9 0;
+#X connect 10 1 24 0;
+#X connect 10 2 6 0;
+#X connect 11 0 5 0;
+#X connect 11 1 12 0;
+#X connect 12 0 18 0;
+#X connect 13 0 17 0;
+#X connect 14 0 2 0;
+#X connect 15 0 13 0;
+#X connect 16 0 3 0;
+#X connect 17 0 16 0;
+#X connect 18 0 9 0;
+#X connect 20 0 3 1;
+#X connect 24 0 7 0;
+#X connect 24 1 4 0;
+#X connect 24 2 14 0;
+#X connect 24 3 20 0;
+#X connect 26 0 11 0;
+#X connect 27 0 17 0;
+#X connect 28 0 17 0;