livetext 0.9.26 → 0.9.27

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/lib/livetext/funcall.rb +13 -94
  3. data/lib/livetext/lineparser.rb +165 -31
  4. data/lib/livetext/parser/string.rb +14 -5
  5. data/lib/livetext/skeleton.rb +0 -4
  6. data/lib/livetext/standard.rb +2 -2
  7. data/lib/livetext/userapi.rb +0 -1
  8. data/lib/livetext/version.rb +1 -1
  9. data/lib/livetext.rb +0 -1
  10. data/test/snapshots/basic_formatting/actual-output.txt +8 -8
  11. data/test/snapshots/basic_formatting/out-sdiff.txt +8 -8
  12. data/test/snapshots/functions/actual-error.txt +19 -0
  13. data/test/snapshots/functions/actual-output.txt +0 -0
  14. data/test/snapshots/functions/err-sdiff.txt +20 -0
  15. data/test/snapshots/more_complex_vars/actual-error.txt +0 -0
  16. data/test/snapshots/more_complex_vars/actual-output.txt +4 -0
  17. data/test/snapshots/more_complex_vars/err-sdiff.txt +1 -0
  18. data/test/snapshots/more_complex_vars/out-sdiff.txt +5 -0
  19. data/test/snapshots/more_functions/actual-error.txt +19 -0
  20. data/test/snapshots/more_functions/actual-output.txt +0 -37
  21. data/test/snapshots/more_functions/err-sdiff.txt +19 -0
  22. data/test/snapshots/raw_lines/actual-error.txt +22 -0
  23. data/test/snapshots/raw_lines/actual-output.txt +0 -0
  24. data/test/snapshots/raw_lines/err-sdiff.txt +23 -0
  25. data/test/snapshots/simple_vars/actual-output.txt +2 -2
  26. data/test/snapshots/simple_vars/out-sdiff.txt +2 -2
  27. data/test/snapshots/var_into_func/actual-error.txt +19 -0
  28. data/test/snapshots/var_into_func/actual-output.txt +0 -16
  29. data/test/snapshots/var_into_func/err-sdiff.txt +19 -0
  30. data/test/unit/all.rb +0 -1
  31. data/test/unit/lineparser.rb +62 -353
  32. data/test/unit/new_lineparser.rb +359 -0
  33. data/test/unit/tokenizer.rb +2 -1
  34. metadata +13 -6
  35. data/lib/livetext/formatline.rb +0 -408
  36. data/test/snapshots/more_functions/out-sdiff.txt +0 -38
  37. data/test/testlines.rb +0 -37
  38. data/test/unit/formatline.rb +0 -638
@@ -35,43 +35,50 @@ class TestingLivetext < MiniTest::Test
35
35
 
36
36
  def test_simple_string
37
37
  parse = LineParser.new("only testing")
38
- tokens = parse.tokenize
38
+ tokens = parse.parse_variables # .tokenize
39
39
  assert_equal tokens, [[:str, "only testing"]], "Tokens were: #{tokens.inspect}"
40
- expected = "only testing"
41
- result = parse.evaluate
42
- assert_equal expected, result
40
+ # expected = "only testing"
41
+ # result = parse.evaluate
42
+ # assert_equal expected, result
43
43
  end
44
44
 
45
45
  def test_variable_interpolation
46
46
  $testme = true
47
47
  parse = LineParser.new("File is $File and user is $User")
48
- tokens = parse.tokenize
48
+ tokens = parse.parse_variables # tokenize
49
49
  expected_tokens = [[:str, "File is "],
50
50
  [:var, "File"],
51
51
  [:str, " and user is "],
52
52
  [:var, "User"]]
53
53
  assert_equal expected_tokens, tokens
54
- result = parse.evaluate
55
- expected = "File is [File is undefined] and user is Hal" # FIXME
56
- assert_equal expected, result
54
+ # result = parse.evaluate
55
+ # expected = "File is [File is undefined] and user is Hal" # FIXME
56
+ # assert_equal expected, result
57
57
  $testme = false
58
58
  end
59
59
 
60
+ def test_NEW_var_expansion
61
+ parse = LineParser.new("File is $File and user is $User")
62
+ expected = "File is [File is undefined] and user is Hal" # FIXME
63
+ str = parse.parse_variables
64
+ assert_equal expected, str
65
+ end
66
+
60
67
  def test_func_expansion
61
68
  parse = LineParser.new("myfunc() results in $$myfunc apparently.")
62
- tokens = parse.tokenize
69
+ tokens = parse.parse_functions # .tokenize
63
70
  expected_tokens = [[:str, "myfunc() results in "],
64
- [:func, "myfunc"],
71
+ [:func, "myfunc", nil, nil],
65
72
  [:str, " apparently."]]
66
73
  assert_equal expected_tokens, tokens
67
- result = parse.evaluate
68
- expected = "myfunc() results in [Error evaluating $$myfunc()] apparently."
69
- assert_equal expected, result
74
+ # result = parse.evaluate
75
+ # expected = "myfunc() results in [Error evaluating $$myfunc()] apparently."
76
+ # assert_equal expected, result
70
77
  end
71
78
 
72
79
  # These tests follow this form:
73
80
  #
74
- # def test_func_SUFFIX
81
+ # def xtest_func_SUFFIX
75
82
  # str = "WHATEVER"
76
83
  # parse = LineParser.new(str)
77
84
  # tokens_expected = [[], [], ...]
@@ -85,8 +92,8 @@ class TestingLivetext < MiniTest::Test
85
92
  def test_func_2
86
93
  str = "Today is $$date"
87
94
  parse = LineParser.new(str)
88
- tokens_expected = [[:str, "Today is "], [:func, "date"]]
89
- tokens = parse.tokenize
95
+ tokens_expected = [[:str, "Today is "], [:func, "date", nil, nil]]
96
+ tokens = parse.parse_functions # tokenize
90
97
  assert_equal tokens_expected, tokens, "Tokens were: #{tokens.inspect}"
91
98
  result = parse.evaluate
92
99
  regex_expected = /Today is ....-..-../
@@ -97,7 +104,7 @@ class TestingLivetext < MiniTest::Test
97
104
  str = "User name is $User, and all is well"
98
105
  parse = LineParser.new(str)
99
106
  tokens_expected = [[:str, "User name is "], [:var, "User"], [:str, ", and all is well"]]
100
- tokens = parse.tokenize
107
+ tokens = parse.parse_variables # tokenize
101
108
  assert_equal tokens_expected, tokens, "Tokens were: #{tokens.inspect}"
102
109
  result = parse.evaluate
103
110
  regex_expected = /User name is .*, /
@@ -108,7 +115,7 @@ class TestingLivetext < MiniTest::Test
108
115
  str = "File name is $File"
109
116
  parse = LineParser.new(str)
110
117
  tokens_expected = [[:str, "File name is "], [:var, "File"]]
111
- tokens = parse.tokenize
118
+ tokens = parse.parse_variables # tokenize
112
119
  assert_equal tokens_expected, tokens
113
120
  result = parse.evaluate
114
121
  string_expected = "File name is [File is undefined]"
@@ -119,7 +126,7 @@ class TestingLivetext < MiniTest::Test
119
126
  str = "$File is my file name"
120
127
  parse = LineParser.new(str)
121
128
  tokens_expected = [[:var, "File"], [:str, " is my file name"]]
122
- tokens = parse.tokenize
129
+ tokens = parse.parse_variables # tokenize
123
130
  assert_equal tokens_expected, tokens
124
131
  result = parse.evaluate
125
132
  string_expected = "[File is undefined] is my file name"
@@ -143,26 +150,25 @@ class TestingLivetext < MiniTest::Test
143
150
  def test_func_needing_parameter_colon_eos # colon, param, EOS
144
151
  str = "Square root of 225 is $$isqrt:225"
145
152
  parse = LineParser.new(str)
146
- tokens_expected = [[:str, "Square root of 225 is "], [:func, "isqrt"], [:colon, "225"]]
147
- tokens = parse.tokenize
153
+ tokens_expected = [[:str, "Square root of 225 is "], [:func, "isqrt", :colon, "225"]]
154
+ tokens = parse.parse_functions # tokenize
148
155
  assert_equal tokens_expected, tokens
149
- result = parse.evaluate
150
- string_expected = "Square root of 225 is 15"
151
- assert_equal string_expected, result, "Found unexpected: #{result.inspect}"
156
+ # result = parse.evaluate
157
+ # string_expected = "Square root of 225 is 15"
158
+ # assert_equal string_expected, result, "Found unexpected: #{result.inspect}"
152
159
  end
153
160
 
154
161
  def test_func_needing_parameter_colon # colon, param, more chars
155
162
  str = "Answer is $$isqrt:225 today"
156
163
  parse = LineParser.new(str)
157
164
  tokens_expected = [[:str, "Answer is "],
158
- [:func, "isqrt"],
159
- [:colon, "225"],
165
+ [:func, "isqrt", :colon, "225"],
160
166
  [:str, " today"]]
161
- tokens = parse.tokenize
167
+ tokens = parse.parse_functions # tokenize
162
168
  assert_equal tokens_expected, tokens
163
- result = parse.evaluate
164
- string_expected = "Answer is 15 today"
165
- assert_equal string_expected, result, "Found unexpected: #{result.inspect}"
169
+ # result = parse.evaluate
170
+ # string_expected = "Answer is 15 today"
171
+ # assert_equal string_expected, result, "Found unexpected: #{result.inspect}"
166
172
  end
167
173
 
168
174
  # isqrt: Not real tests??
@@ -171,75 +177,66 @@ class TestingLivetext < MiniTest::Test
171
177
  str = "Calculate $$isqrt:"
172
178
  parse = LineParser.new(str)
173
179
  tokens_expected = [[:str, "Calculate "],
174
- [:func, "isqrt"] # , [:colon, ""]
175
- ]
176
- # If param is null, we don't get [:colon, value]!
177
- # ^ FIXME function should be more like: [:func, name, param]
178
- tokens = parse.tokenize
180
+ [:func, "isqrt", :colon, ""]]
181
+ tokens = parse.parse_functions # tokenize
179
182
  assert_equal tokens_expected, tokens
180
- result = parse.evaluate
181
- string_expected = "Calculate [Error evaluating $$isqrt(NO PARAM)]"
182
- assert_equal string_expected, result, "Found unexpected: #{result.inspect}"
183
+ # result = parse.evaluate
184
+ # string_expected = "Calculate [Error evaluating $$isqrt(NO PARAM)]"
185
+ # assert_equal string_expected, result, "Found unexpected: #{result.inspect}"
183
186
  end
184
187
 
185
188
  def test_isqrt_empty_bracket_param
186
189
  str = "Calculate $$isqrt[]"
187
190
  parse = LineParser.new(str)
188
191
  tokens_expected = [[:str, "Calculate "],
189
- [:func, "isqrt"] # , [:colon, ""]
192
+ [:func, "isqrt", :brackets, ""] # , [:colon, ""]
190
193
  ]
191
194
  # If param is null, we don't get [:colon, value]!
192
195
  # ^ FIXME function should be more like: [:func, name, param]
193
- tokens = parse.tokenize
196
+ tokens = parse.parse_functions # tokenize
194
197
  assert_equal tokens_expected, tokens
195
- result = parse.evaluate
196
- string_expected = "Calculate [Error evaluating $$isqrt(NO PARAM)]"
197
- assert_equal string_expected, result, "Found unexpected: #{result.inspect}"
198
+ # result = parse.evaluate
199
+ # string_expected = "Calculate [Error evaluating $$isqrt(NO PARAM)]"
200
+ # assert_equal string_expected, result, "Found unexpected: #{result.inspect}"
198
201
  end
199
202
 
200
203
  def test_isqrt_malformed_number
201
204
  str = "Calculate $$isqrt[3a5]"
202
205
  parse = LineParser.new(str)
203
206
  tokens_expected = [[:str, "Calculate "],
204
- [:func, "isqrt"],
205
- [:brackets, "3a5"]
207
+ [:func, "isqrt", :brackets, "3a5"]
206
208
  ]
207
209
  # ^ FIXME function should be more like: [:func, name, param]
208
- tokens = parse.tokenize
210
+ tokens = parse.parse_functions # tokenize
209
211
  assert_equal tokens_expected, tokens
210
- result = parse.evaluate
211
- string_expected = "Calculate [Error evaluating $$isqrt(3a5)]"
212
- assert_equal string_expected, result, "Found unexpected: #{result.inspect}"
212
+ # result = parse.evaluate
213
+ # string_expected = "Calculate [Error evaluating $$isqrt(3a5)]"
214
+ # assert_equal string_expected, result, "Found unexpected: #{result.inspect}"
213
215
  end
214
216
 
215
217
  # ...end of this group
216
218
 
217
219
  def test_func_with_colon
218
220
  parse = LineParser.new("Calling $$myfunc:foo here.")
219
- tokens = parse.tokenize
221
+ tokens = parse.parse_functions # tokenize
220
222
  assert_equal tokens, [[:str, "Calling "],
221
- [:func, "myfunc"],
222
- [:colon, "foo"],
223
- [:str, " here."]
224
- ]
225
- result = parse.evaluate
226
- expected = "Calling [Error evaluating $$myfunc(foo)] here."
227
- assert_equal expected, result
223
+ [:func, "myfunc", :colon, "foo"],
224
+ [:str, " here."]]
225
+ # result = parse.evaluate
226
+ # expected = "Calling [Error evaluating $$myfunc(foo)] here."
227
+ # assert_equal expected, result
228
228
  end
229
229
 
230
230
  def test_func_with_brackets
231
231
  parse = LineParser.new("Calling $$myfunc2[foo bar] here.")
232
- tokens = parse.tokenize
233
- assert_kind_of Array, tokens
234
- assert_equal 4, tokens.size
232
+ tokens = parse.parse_functions # .tokenize
235
233
  expected_tokens = [[:str, "Calling "],
236
- [:func, "myfunc2"],
237
- [:brackets, "foo bar"],
234
+ [:func, "myfunc2", :brackets, "foo bar"],
238
235
  [:str, " here."]]
239
236
  assert_equal expected_tokens, tokens
240
- result = parse.evaluate
241
- expected = "Calling [Error evaluating $$myfunc2(foo bar)] here."
242
- assert_equal expected, result
237
+ # result = parse.evaluate
238
+ # expected = "Calling [Error evaluating $$myfunc2(foo bar)] here."
239
+ # assert_equal expected, result
243
240
  end
244
241
 
245
242
  def test_parse_formatting
@@ -260,294 +257,6 @@ class TestingLivetext < MiniTest::Test
260
257
  invoke_test(msg, src, exp)
261
258
  end
262
259
 
263
- def test_formatting_02 # Check output of $$date
264
- msg, src, exp = <<~STUFF.split("\n")
265
- Check output of $$date
266
- Today is $$date, I guess
267
- /Today is \\d\\d\\d\\d-\\d\\d-\\d\\d, I guess/
268
- STUFF
269
- invoke_test(msg, src, exp)
270
- end
271
-
272
- def test_formatting_03 # Check output of $$date
273
- msg, src, exp = <<~STUFF.split("\n")
274
- Check output of $$date
275
- Today is $$date, I guess
276
- /Today is \\d\\d\\d\\d-\\d\\d-\\d\\d, I guess/
277
- STUFF
278
- invoke_test(msg, src, exp)
279
- end
280
-
281
- def test_formatting_04 # Check output of $$date
282
- msg, src, exp = <<~STUFF.split("\n")
283
- Check output of $$date
284
- Today is $$date, I guess
285
- /Today is \\d\\d\\d\\d-\\d\\d-\\d\\d, I guess/
286
- STUFF
287
- invoke_test(msg, src, exp)
288
- end
289
-
290
- def test_formatting_05 # Check output of $$date
291
- msg, src, exp = <<~STUFF.split("\n")
292
- Check output of $$date
293
- Today is $$date, I guess
294
- /Today is \\d\\d\\d\\d-\\d\\d-\\d\\d, I guess/
295
- STUFF
296
- invoke_test(msg, src, exp)
297
- end
298
-
299
- def test_formatting_06 # Check output of $$date
300
- msg, src, exp = <<~STUFF.split("\n")
301
- Check output of $$date
302
- Today is $$date, I guess
303
- /Today is \\d\\d\\d\\d-\\d\\d-\\d\\d, I guess/
304
- STUFF
305
- invoke_test(msg, src, exp)
306
-
307
- actual = LineParser.parse!(src)
308
- if exp[0] == "/"
309
- exp = Regexp.compile(exp[1..-2]) # skip slashes
310
- assert_match(exp, actual, msg)
311
- else
312
- assert_equal(exp, actual, msg)
313
- end
314
- end
315
-
316
- def test_formatting_07 # Check output of $$date
317
- msg, src, exp = <<~STUFF.split("\n")
318
- Check output of $$date
319
- Today is $$date, I guess
320
- /Today is \\d\\d\\d\\d-\\d\\d-\\d\\d, I guess/
321
- STUFF
322
- invoke_test(msg, src, exp)
323
-
324
- actual = LineParser.parse!(src)
325
- if exp[0] == "/"
326
- exp = Regexp.compile(exp[1..-2]) # skip slashes
327
- assert_match(exp, actual, msg)
328
- else
329
- assert_equal(exp, actual, msg)
330
- end
331
- end
332
-
333
- def test_formatting_08 # Check output of $$date
334
- msg, src, exp = <<~STUFF.split("\n")
335
- Check output of $$date
336
- Today is $$date, I guess
337
- /Today is \\d\\d\\d\\d-\\d\\d-\\d\\d, I guess/
338
- STUFF
339
- invoke_test(msg, src, exp)
340
- end
341
-
342
- def test_formatting_09 # Check output of $$date
343
- msg, src, exp = <<~STUFF.split("\n")
344
- Check output of $$date
345
- Today is $$date, I guess
346
- /Today is \\d\\d\\d\\d-\\d\\d-\\d\\d, I guess/
347
- STUFF
348
- invoke_test(msg, src, exp)
349
- end
350
-
351
- def test_formatting_10 # Check output of $$date
352
- msg, src, exp = <<~STUFF.split("\n")
353
- Check output of $$date
354
- Today is $$date, I guess
355
- /Today is \\d\\d\\d\\d-\\d\\d-\\d\\d, I guess/
356
- STUFF
357
- invoke_test(msg, src, exp)
358
- end
359
-
360
- def test_formatting_11 # Check output of $$date
361
- msg, src, exp = <<~STUFF.split("\n")
362
- Check output of $$date
363
- Today is $$date, I guess
364
- /Today is \\d\\d\\d\\d-\\d\\d-\\d\\d, I guess/
365
- STUFF
366
- invoke_test(msg, src, exp)
367
- end
368
-
369
- def test_formatting_12 # Check output of $$date
370
- msg, src, exp = <<~STUFF.split("\n")
371
- Check output of $$date
372
- Today is $$date, I guess
373
- /Today is \\d\\d\\d\\d-\\d\\d-\\d\\d, I guess/
374
- STUFF
375
- invoke_test(msg, src, exp)
376
- end
377
-
378
- def test_formatting_13 # Check output of $$date
379
- msg, src, exp = <<~STUFF.split("\n")
380
- Check output of $$date
381
- Today is $$date, I guess
382
- /Today is \\d\\d\\d\\d-\\d\\d-\\d\\d, I guess/
383
- STUFF
384
- invoke_test(msg, src, exp)
385
- end
386
-
387
- def test_formatting_14 # Check output of $$date
388
- msg, src, exp = <<~STUFF.split("\n")
389
- Check output of $$date
390
- Today is $$date, I guess
391
- /Today is \\d\\d\\d\\d-\\d\\d-\\d\\d, I guess/
392
- STUFF
393
- invoke_test(msg, src, exp)
394
- end
395
-
396
- def test_formatting_15 # Check output of $$date
397
- msg, src, exp = <<~STUFF.split("\n")
398
- Check output of $$date
399
- Today is $$date, I guess
400
- /Today is \\d\\d\\d\\d-\\d\\d-\\d\\d, I guess/
401
- STUFF
402
- invoke_test(msg, src, exp)
403
- end
404
-
405
- def test_formatting_16 # Check output of $$date
406
- msg, src, exp = <<~STUFF.split("\n")
407
- Check output of $$date
408
- Today is $$date, I guess
409
- /Today is \\d\\d\\d\\d-\\d\\d-\\d\\d, I guess/
410
- STUFF
411
- invoke_test(msg, src, exp)
412
- end
413
-
414
- def test_formatting_17 # Check output of $$date
415
- msg, src, exp = <<~STUFF.split("\n")
416
- Check output of $$date
417
- Today is $$date, I guess
418
- /Today is \\d\\d\\d\\d-\\d\\d-\\d\\d, I guess/
419
- STUFF
420
- invoke_test(msg, src, exp)
421
- end
422
-
423
- def test_formatting_18 # Check output of $$date
424
- msg, src, exp = <<~STUFF.split("\n")
425
- Check output of $$date
426
- Today is $$date, I guess
427
- /Today is \\d\\d\\d\\d-\\d\\d-\\d\\d, I guess/
428
- STUFF
429
- invoke_test(msg, src, exp)
430
- end
431
-
432
- def test_formatting_19 # Check output of $$date
433
- msg, src, exp = <<~STUFF.split("\n")
434
- Check output of $$date
435
- Today is $$date, I guess
436
- /Today is \\d\\d\\d\\d-\\d\\d-\\d\\d, I guess/
437
- STUFF
438
- invoke_test(msg, src, exp)
439
- end
440
-
441
- def test_formatting_20 # Check output of $$date
442
- $testme = true
443
- msg, src, exp = <<~STUFF.split("\n")
444
- Check output of $$date
445
- Today is $$date, I guess
446
- /Today is \\d\\d\\d\\d-\\d\\d-\\d\\d, I guess/
447
- STUFF
448
- invoke_test(msg, src, exp)
449
- $testme = false
450
- end
451
-
452
- def test_formatting_21 # Check output of $$date
453
- msg, src, exp = <<~STUFF.split("\n")
454
- Check output of $$date
455
- Today is $$date, I guess
456
- /Today is \\d\\d\\d\\d-\\d\\d-\\d\\d, I guess/
457
- STUFF
458
- invoke_test(msg, src, exp)
459
- end
460
-
461
- def test_formatting_22 # Check output of $$date
462
- msg, src, exp = <<~STUFF.split("\n")
463
- Check output of $$date
464
- Today is $$date, I guess
465
- /Today is \\d\\d\\d\\d-\\d\\d-\\d\\d, I guess/
466
- STUFF
467
- invoke_test(msg, src, exp)
468
- end
469
-
470
- def test_formatting_23 # Check output of $$date
471
- msg, src, exp = <<~STUFF.split("\n")
472
- Check output of $$date
473
- Today is $$date, I guess
474
- /Today is \\d\\d\\d\\d-\\d\\d-\\d\\d, I guess/
475
- STUFF
476
- invoke_test(msg, src, exp)
477
- end
478
-
479
- def test_formatting_24 # Check output of $$date
480
- msg, src, exp = <<~STUFF.split("\n")
481
- Check output of $$date
482
- Today is $$date, I guess
483
- /Today is \\d\\d\\d\\d-\\d\\d-\\d\\d, I guess/
484
- STUFF
485
- invoke_test(msg, src, exp)
486
- end
487
-
488
- def test_formatting_25 # Check output of $$date
489
- msg, src, exp = <<~STUFF.split("\n")
490
- Check output of $$date
491
- Today is $$date, I guess
492
- /Today is \\d\\d\\d\\d-\\d\\d-\\d\\d, I guess/
493
- STUFF
494
- invoke_test(msg, src, exp)
495
- end
496
-
497
- def test_formatting_26 # Check output of $$date
498
- msg, src, exp = <<~STUFF.split("\n")
499
- Check output of $$date
500
- Today is $$date, I guess
501
- /Today is \\d\\d\\d\\d-\\d\\d-\\d\\d, I guess/
502
- STUFF
503
- invoke_test(msg, src, exp)
504
- end
505
-
506
- def test_formatting_27 # Check output of $$date
507
- msg, src, exp = <<~STUFF.split("\n")
508
- Check output of $$date
509
- Today is $$date, I guess
510
- /Today is \\d\\d\\d\\d-\\d\\d-\\d\\d, I guess/
511
- STUFF
512
- invoke_test(msg, src, exp)
513
- end
514
-
515
- def test_formatting_28 # Check output of $$date
516
- msg, src, exp = <<~STUFF.split("\n")
517
- Check output of $$date
518
- Today is $$date, I guess
519
- /Today is \\d\\d\\d\\d-\\d\\d-\\d\\d, I guess/
520
- STUFF
521
- invoke_test(msg, src, exp)
522
- end
523
-
524
- def test_formatting_29 # Check output of $$date
525
- msg, src, exp = <<~STUFF.split("\n")
526
- Check output of $$date
527
- Today is $$date, I guess
528
- /Today is \\d\\d\\d\\d-\\d\\d-\\d\\d, I guess/
529
- STUFF
530
- invoke_test(msg, src, exp)
531
- end
532
-
533
- def test_formatting_30 # Check output of $$date
534
- msg, src, exp = <<~STUFF.split("\n")
535
- Check output of $$date
536
- Today is $$date, I guess
537
- /Today is \\d\\d\\d\\d-\\d\\d-\\d\\d, I guess/
538
- STUFF
539
- invoke_test(msg, src, exp)
540
- end
541
-
542
- def test_formatting_31 # Check output of $$date
543
- msg, src, exp = <<~STUFF.split("\n")
544
- Check output of $$date
545
- Today is $$date, I guess
546
- /Today is \\d\\d\\d\\d-\\d\\d-\\d\\d, I guess/
547
- STUFF
548
- invoke_test(msg, src, exp)
549
- end
550
-
551
260
  def test_formatting_32 # Check "real" dollar signs
552
261
  msg, src, exp = <<~STUFF.split("\n")
553
262
  Check "real" dollar signs