Index: tests/natools-s_expressions-templates-tests-integers.adb ================================================================== --- tests/natools-s_expressions-templates-tests-integers.adb +++ tests/natools-s_expressions-templates-tests-integers.adb @@ -83,10 +83,11 @@ procedure All_Tests (Report : in out NT.Reporter'Class) is begin Alignment (Report); Default_Format (Report); + Explicit_Images (Report); Explicit_Sign (Report); Hexadecimal (Report); Overflow (Report); Parse_Errors (Report); Static_Hash_Map (Report); @@ -144,10 +145,27 @@ end; exception when Error : others => Test.Report_Exception (Error); end Explicit_Default_Format; + + procedure Explicit_Images (Report : in out NT.Reporter'Class) is + Test : NT.Test := Report.Item ("Explicit images in template"); + begin + Test_Render (Test, "(image (-2 two) (666 evil))", 10, "10"); + Test_Render (Test, "(image (-2 two) (666 evil))", -2, "two"); + Test_Render (Test, "(image (-2 two) (666 evil))", 666, "evil"); + Test_Render (Test, "(image (-2 two) (666 evil) (-2))", -2, "-2"); + Test_Render (Test, "(image (1 one))3:Two4:four", 1, "one"); + Test_Render (Test, "(image (1 one))3:Two4:four", 2, "Two"); + Test_Render (Test, "(image (1 one))3:Two4:four", 3, "four"); + Test_Render (Test, "(image (1 one))3:Two4:four", 4, "4"); + Test_Render (Test, "(image (invalid -))5:first", Integer'First, "first"); + exception + when Error : others => Test.Report_Exception (Error); + end Explicit_Images; + procedure Explicit_Sign (Report : in out NT.Reporter'Class) is Test : NT.Test := Report.Item ("Explicit sign specification"); begin Test_Render (Test, "(sign +)", 42, "+42"); Index: tests/natools-s_expressions-templates-tests-integers.ads ================================================================== --- tests/natools-s_expressions-templates-tests-integers.ads +++ tests/natools-s_expressions-templates-tests-integers.ads @@ -25,12 +25,13 @@ procedure All_Tests (Report : in out NT.Reporter'Class); procedure Alignment (Report : in out NT.Reporter'Class); procedure Default_Format (Report : in out NT.Reporter'Class); procedure Explicit_Default_Format (Report : in out NT.Reporter'Class); + procedure Explicit_Images (Report : in out NT.Reporter'Class); procedure Explicit_Sign (Report : in out NT.Reporter'Class); procedure Hexadecimal (Report : in out NT.Reporter'Class); procedure Overflow (Report : in out NT.Reporter'Class); procedure Parse_Errors (Report : in out NT.Reporter'Class); procedure Static_Hash_Map (Report : in out NT.Reporter'Class); end Natools.S_Expressions.Templates.Tests.Integers;