1 /* Test askinteger and asksign -- these are interactive,
2 * therefore this script SHOULD NOT be included in testsuite_files.
4 * You can run this script via batch("tests/rtest_ask.mac", test);
5 * and respond as indicated by the messages.
6 * The appropriate inputs are also contained in tests/rtest_ask_input.mac
7 * and therefore you can run all tests automatically like this:
9 * maxima --batch-string='batch("tests/rtest_ask.mac", test);' < tests/rtest_ask_input.mac
15 /* commit 3137b946 tried to fix *LOCAL-SIGNS* craziness,
16 * but screwed up in its own way. Fixed for good this time?
17 * Nicked from mailing list circa 2013-08-28
19 block (print ("Please enter 'p;' now:"), 0);
22 integrate(sin(omega*t)*exp(-s*t),t,0,inf);
25 block (print ("Please enter 'p;' now:"), 0);
28 [asksign (foo), sign (foo), sign (foo)];
31 block (print ("Please enter 'n;' now:"), 0);
34 [asksign (foo), sign (foo), sign (foo)];
37 block (print ("Please enter 'z;' now:"), 0);
40 [asksign (foo), sign (foo), sign (foo)];
43 block (print ("Please enter 'p;' now:"), 0);
46 limit((exp(a*x)-1)/(exp(a*x)+1),x,inf);
49 block (print ("Please enter 'n;' now:"), 0);
52 limit((exp(a*x)-1)/(exp(a*x)+1),x,inf);
55 block (print ("Please enter 'z;' now:"), 0);
58 limit((exp(a*x)-1)/(exp(a*x)+1),x,inf);
61 /* mailing list 2017-11-25: "bug in Laplace transform"
62 * root cause is asksign(-a^2) forgot the minus sign,
63 * so include some cases to handle that and then the Laplace transform.
66 (print ("Please enter 'z;' now:"), 0);
71 (print ("Please enter 'nz;' now:"), 0);
76 (print ("Please enter 'p;' now:"), 0);
81 (print ("Please enter 'n;' now:"), 0);
86 (print ("Please enter 'z;' now:"), 0);
91 (print ("Please enter 'z;' now:"), 0);
96 (print ("Please enter 'nz;' now:"), 0);
101 (print ("Please enter 'p;' now:"), 0);
106 (print ("Please enter 'n;' now:"), 0);
111 (print ("Please enter 'z;' now:"), 0);
116 (print ("Please enter 'z;' now:"), 0);
121 (print ("Please enter 'nz;' now:"), 0);
126 (print ("Please enter 'p;' now:"), 0);
131 (print ("Please enter 'n;' now:"), 0);
136 (print ("Please enter 'z;' now:"), 0);
141 (print ("Please enter 'z;' now:"), 0);
146 (print ("Please enter 'nz;' now:"), 0);
151 (print ("Please enter 'p;' now:"), 0);
156 (print ("Please enter 'n;' now:"), 0);
161 (print ("Please enter 'z;' now:"), 0);
166 (print ("Please enter 'p;' now:"), 0);
171 (print ("Please enter 'n;' now:"), 0);
176 (print ("Please enter 'z;' now:"), 0);
181 (print ("Please enter 'p;' now:"), 0);
186 (print ("Please enter 'n;' now:"), 0);
191 (print ("Please enter 'z;' now:"), 0);
196 (print ("Please enter 'p;' now:"), 0);
201 (print ("Please enter 'n;' now:"), 0);
206 (print ("Please enter 'z;' now:"), 0);
211 (print ("Please enter 'p;' now:"), 0);
216 (print ("Please enter 'n;' now:"), 0);
221 (print ("Please enter 'z;' now:"), 0);
226 (print ("Please enter 'p;' now:"), 0);
231 (print ("Please enter 'n;' now:"), 0);
236 (print ("Please enter 'z;' now:"), 0);
241 (print ("Please enter 'p;' now:"), 0);
246 (print ("Please enter 'n;' now:"), 0);
251 (print ("Please enter 'z;' now:"), 0);
256 (print ("Please enter 'z;' now:"), 0);
261 (print ("Please enter 'nz;' now:"), 0);
266 (print ("Please enter 'p;' now:"), 0);
271 (print ("Please enter 'n;' now:"), 0);
276 (print ("Please enter 'z;' now:"), 0);
281 (print ("Please enter 'z;' now:"), 0);
286 (print ("Please enter 'nz;' now:"), 0);
291 (print ("Please enter 'p;' now:"), 0);
296 (print ("Please enter 'n;' now:"), 0);
301 (print ("Please enter 'z;' now:"), 0);
306 (print ("Please enter 'z;' now:"), 0);
311 (print ("Please enter 'nz;' now:"), 0);
316 (print ("Please enter 'p;' now:"), 0);
321 (print ("Please enter 'n;' now:"), 0);
326 (print ("Please enter 'z;' now:"), 0);
331 (print ("Please enter 'z;' now:"), 0);
336 (print ("Please enter 'nz;' now:"), 0);
341 (print ("Please enter 'p;' now:"), 0);
346 (print ("Please enter 'n;' now:"), 0);
351 (print ("Please enter 'z;' now:"), 0);
356 /* here's the Laplace transform that exposed the bug */
358 (print ("Please enter 'z;' now:"), 0);
360 laplace (delta (t - x^2), t, s);
363 (print ("Please enter 'nz;' now:"), 0);
365 laplace (delta (t - x^2), t, s);