299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
|
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
|
-
+
+
+
+
+
-
|
end Test_Local_Fallback;
procedure Test_Premanent_Fallback (Report : in out NT.Reporter'Class) is
Test : NT.Test := Report.Item ("Permanent fallback");
begin
declare
Inter : Test_Interpreters.Interpreter := Test_Interpreter;
Inter : constant Test_Interpreters.Interpreter
:= Test_Interpreters.Build
((Test_Interpreters.Item ("cmd", Recorder'(null record)),
Test_Interpreters.Item ("command", Recorder'(null record))),
Fallback => "cmd");
Buffer : aliased Test_Tools.Memory_Stream;
Printer : Printers.Canonical (Buffer'Access);
Input : constant Caches.Reference := Invalid_Commands;
Cursor : Caches.Cursor := Input.First;
begin
Buffer.Set_Expected (To_Atom
("7:not-cmd(14:7:not-cmd3:arg)13:not-a-command"
& "(18:13:not-a-command())"));
Inter.Set_Fallback (To_Atom ("cmd"));
Inter.Execute (Cursor, Printer, True);
Buffer.Check_Stream (Test);
end;
exception
when Error : others => Test.Report_Exception (Error);
end Test_Premanent_Fallback;
|