Natools

Check-in [d42a09ad5a]
Login
Overview
Comment:s_expressions-printers-pretty-tests: also test width of tab-only indentations
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d42a09ad5aee91bbe1960cad690f5949309b3e19
User & Date: nat on 2014-07-30 20:57:36
Other Links: manifest | tags
Context
2014-07-31
19:16
s_expressions-printers-pretty: fix width of tab-only indentations check-in: 78cfd91715 user: nat tags: trunk
2014-07-30
20:57
s_expressions-printers-pretty-tests: also test width of tab-only indentations check-in: d42a09ad5a user: nat tags: trunk
2014-07-29
21:53
s_expressions-printers-pretty-tests: new test to check tabulation width in quoted strings check-in: 01fc582c43 user: nat tags: trunk
Changes

Modified tests/natools-s_expressions-printers-pretty-tests.adb from [63945212c8] to [03f0a8fd5f].

767
768
769
770
771
772
773



























774
775
776
777
778
779
780
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807







+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+







         P.Open_List;
         Fill (P, 3);
         P.Close_List;
         Fill (P, 3);
         P.Close_List;
         P.Close_List;
         Fill (P, 4);
         P.Close_List;
         P.Close_List;

         Output.Check_Stream (Test);
      end;

      declare
         Output : aliased Test_Tools.Memory_Stream;
         P : Stream_Printer (Output'Access);
      begin
         Output.Set_Expected (To_Atom                  --  1234-6789-1234-6789-
            ("(first-level x x x x" & NL               --  (first-level x x x x
           & Tab & "x x x x x x x x" & NL              --  >----x x x x x x x x
           & Tab & "x x (second x x" & NL              --  >----x x (second x x
           & Tab & Tab & "x x x x x" & NL              --  >---->----x x x x x
           & Tab & Tab & "x x))"));                    --  >---->----x x))

         P.Set_Parameters (Param);
         P.Set_Indent (Tabs);
         P.Set_Indentation (1);

         P.Open_List;
         P.Append_Atom (To_Atom ("first-level"));
         Fill (P, 14);
         P.Open_List;
         P.Append_Atom (To_Atom ("second"));
         Fill (P, 9);
         P.Close_List;
         P.Close_List;

         Output.Check_Stream (Test);
      end;
   exception
      when Error : others => Test.Report_Exception (Error);