]> git.donarmstrong.com Git - perltidy.git/commitdiff
add test for -bbhb and -bbp
authorSteve Hancock <perltidy@users.sourceforge.net>
Tue, 15 Sep 2020 23:03:24 +0000 (16:03 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Tue, 15 Sep 2020 23:03:24 +0000 (16:03 -0700)
local-docs/BugLog.pod
t/snippets/bbhb.in [new file with mode: 0644]
t/snippets/bbhb2.par [new file with mode: 0644]
t/snippets/bbhb3.par [new file with mode: 0644]
t/snippets/expect/bbhb.bbhb2 [new file with mode: 0644]
t/snippets/expect/bbhb.bbhb3 [new file with mode: 0644]
t/snippets/expect/bbhb.def [new file with mode: 0644]
t/snippets/packing_list.txt
t/snippets22.t

index de9ba82aa6910fb86e4aad34d01a7975295c0615..bce442258fcae0b97886c0a18c38c0b080fe1b58 100644 (file)
@@ -8,11 +8,14 @@ found with the help of automated random testing.
 =item B<make the arrow a vertical alignment token, git #39>
 
 The -> can now be vertically aligned if a space is placed before it with -wls='->'.
+Added 15 Sep 2020 as part of previous item, 9ac6af6.
 
 =item B<add flags -bbhb=n, -bbsb=n, =bbp=n, git #38>
 
 These flags give control over the opening token of a multiple-line list. They are
 described in the man pages, perltidy.html.
+Added 15 Sep 2020 in "added flags -bbhb=n, -bbsb=n, -bbq=n, suggestion git #38".
+9ac6af6.
 
 =item B<Allow vertical alignment of line-ending fat comma>
 
diff --git a/t/snippets/bbhb.in b/t/snippets/bbhb.in
new file mode 100644 (file)
index 0000000..98061f6
--- /dev/null
@@ -0,0 +1,7 @@
+my %temp = 
+( 
+supsup => 123, 
+nested => { 
+asdf => 456, 
+yarg => 'yarp', 
+}, );
diff --git a/t/snippets/bbhb2.par b/t/snippets/bbhb2.par
new file mode 100644 (file)
index 0000000..cee16b3
--- /dev/null
@@ -0,0 +1 @@
+-bbhb=2 -bbp=2
diff --git a/t/snippets/bbhb3.par b/t/snippets/bbhb3.par
new file mode 100644 (file)
index 0000000..3a346be
--- /dev/null
@@ -0,0 +1 @@
+-bbhb=3 -bbp=3
diff --git a/t/snippets/expect/bbhb.bbhb2 b/t/snippets/expect/bbhb.bbhb2
new file mode 100644 (file)
index 0000000..670c04d
--- /dev/null
@@ -0,0 +1,8 @@
+my %temp =
+  (
+    supsup => 123,
+    nested => {
+        asdf => 456,
+        yarg => 'yarp',
+    },
+  );
diff --git a/t/snippets/expect/bbhb.bbhb3 b/t/snippets/expect/bbhb.bbhb3
new file mode 100644 (file)
index 0000000..a39f536
--- /dev/null
@@ -0,0 +1,9 @@
+my %temp =
+  (
+    supsup => 123,
+    nested =>
+      {
+        asdf => 456,
+        yarg => 'yarp',
+      },
+  );
diff --git a/t/snippets/expect/bbhb.def b/t/snippets/expect/bbhb.def
new file mode 100644 (file)
index 0000000..25acb75
--- /dev/null
@@ -0,0 +1,7 @@
+my %temp = (
+    supsup => 123,
+    nested => {
+        asdf => 456,
+        yarg => 'yarp',
+    },
+);
index c1c2cd6fc8be52293f36088439dbccc59b560ef9..ee9972877c1f64280f7fa2619155f1fb5c8d9d0f 100644 (file)
 ../snippets9.t rt98902.def
 ../snippets9.t rt98902.rt98902
 ../snippets9.t rt99961.def
+../snippets22.t        bbhb.bbhb2
+../snippets22.t        bbhb.bbhb3
+../snippets22.t        bbhb.def
index 782c7c48e4ec2e123c142f8630eacdb105e364b6..a640288a4352c44fa2bb23e66a271c044e5cf145 100644 (file)
@@ -2,6 +2,9 @@
 
 # Contents:
 #1 here_long.here_long
+#2 bbhb.bbhb2
+#3 bbhb.bbhb3
+#4 bbhb.def
 
 # To locate test #13 you can search for its name or the string '#13'
 
@@ -18,13 +21,28 @@ BEGIN {
     ###########################################
     # BEGIN SECTION 1: Parameter combinations #
     ###########################################
-    $rparams = { 'here_long' => "-l=33", };
+    $rparams = {
+        'bbhb2'     => "-bbhb=2 -bbp=2",
+        'bbhb3'     => "-bbhb=3 -bbp=3",
+        'def'       => "",
+        'here_long' => "-l=33",
+    };
 
     ############################
     # BEGIN SECTION 2: Sources #
     ############################
     $rsources = {
 
+        'bbhb' => <<'----------',
+my %temp = 
+( 
+supsup => 123, 
+nested => { 
+asdf => 456, 
+yarg => 'yarp', 
+}, );
+----------
+
         'here_long' => <<'----------',
 # must not break after here target regardless of maximum-line-length
 $sth= $dbh->prepare (<<"END_OF_SELECT") or die "Couldn't prepare SQL" ;
@@ -53,6 +71,51 @@ END_OF_SELECT
 
 #1...........
         },
+
+        'bbhb.bbhb2' => {
+            source => "bbhb",
+            params => "bbhb2",
+            expect => <<'#2...........',
+my %temp =
+  (
+    supsup => 123,
+    nested => {
+        asdf => 456,
+        yarg => 'yarp',
+    },
+  );
+#2...........
+        },
+
+        'bbhb.bbhb3' => {
+            source => "bbhb",
+            params => "bbhb3",
+            expect => <<'#3...........',
+my %temp =
+  (
+    supsup => 123,
+    nested =>
+      {
+        asdf => 456,
+        yarg => 'yarp',
+      },
+  );
+#3...........
+        },
+
+        'bbhb.def' => {
+            source => "bbhb",
+            params => "def",
+            expect => <<'#4...........',
+my %temp = (
+    supsup => 123,
+    nested => {
+        asdf => 456,
+        yarg => 'yarp',
+    },
+);
+#4...........
+        },
     };
 
     my $ntests = 0 + keys %{$rtests};