Index: tests/natools-s_expressions-interpreter_tests.adb ================================================================== --- tests/natools-s_expressions-interpreter_tests.adb +++ tests/natools-s_expressions-interpreter_tests.adb @@ -140,10 +140,11 @@ Test_Basic_Usage (Report); Test_Unknown_Commands (Report); Test_Premanent_Fallback (Report); Test_Local_Fallback (Report); Test_Exception_Fallback (Report); + Test_Inspection (Report); end All_Tests; ---------------------- @@ -236,10 +237,44 @@ end; exception when Error : others => Test.Report_Exception (Error); end Test_Exception_Fallback; + + procedure Test_Inspection (Report : in out NT.Reporter'Class) is + Test : NT.Test := Report.Item ("Inspection"); + begin + declare + Inter : Test_Interpreters.Interpreter; + begin + if not Inter.Is_Empty then + Test.Fail ("Default interpreter is not empty"); + end if; + + if Inter.Has_Command (To_Atom ("cmd")) then + Test.Fail ("Default interpreter has command ""cmd"""); + end if; + + Inter := Test_Interpreter; + + if Inter.Is_Empty then + Test.Fail ("Test interpreter is empty"); + end if; + + if not Inter.Has_Command (To_Atom ("cmd")) then + Test.Fail ("Test interpreter has not command ""cmd"""); + end if; + + if Inter.Has_Command (To_Atom ("not-a-cmd")) then + Test.Fail ("Test interpreter has command ""not-a-cmd"""); + end if; + + end; + exception + when Error : others => Test.Report_Exception (Error); + end Test_Inspection; + procedure Test_Local_Fallback (Report : in out NT.Reporter'Class) is Test : NT.Test := Report.Item ("Local fallback"); begin declare Index: tests/natools-s_expressions-interpreter_tests.ads ================================================================== --- tests/natools-s_expressions-interpreter_tests.ads +++ tests/natools-s_expressions-interpreter_tests.ads @@ -32,10 +32,11 @@ procedure All_Tests (Report : in out NT.Reporter'Class); procedure Test_Basic_Usage (Report : in out NT.Reporter'Class); procedure Test_Exception_Fallback (Report : in out NT.Reporter'Class); + procedure Test_Inspection (Report : in out NT.Reporter'Class); procedure Test_Local_Fallback (Report : in out NT.Reporter'Class); procedure Test_Premanent_Fallback (Report : in out NT.Reporter'Class); procedure Test_Unknown_Commands (Report : in out NT.Reporter'Class); private