]> git.donarmstrong.com Git - perltidy.git/commitdiff
added test for issue git #74
authorSteve Hancock <perltidy@users.sourceforge.net>
Wed, 24 Nov 2021 01:19:43 +0000 (17:19 -0800)
committerSteve Hancock <perltidy@users.sourceforge.net>
Wed, 24 Nov 2021 01:19:43 +0000 (17:19 -0800)
t/snippets/expect/git74.def [new file with mode: 0644]
t/snippets/expect/git74.git74 [new file with mode: 0644]
t/snippets/git74.in [new file with mode: 0644]
t/snippets/git74.par [new file with mode: 0644]
t/snippets/packing_list.txt
t/snippets25.t

diff --git a/t/snippets/expect/git74.def b/t/snippets/expect/git74.def
new file mode 100644 (file)
index 0000000..73d6592
--- /dev/null
@@ -0,0 +1,9 @@
+$self->func(
+    {
+        command  => [ 'command', 'argument1', 'argument2' ],
+        callback => sub {
+            my ($res) = @_;
+            print($res);
+        }
+    }
+);
diff --git a/t/snippets/expect/git74.git74 b/t/snippets/expect/git74.git74
new file mode 100644 (file)
index 0000000..40cb451
--- /dev/null
@@ -0,0 +1,10 @@
+$self -> func (
+                {
+                   command  => [ 'command', 'argument1', 'argument2' ],
+                   callback => sub
+                       {
+                       my ($res) = @_ ;
+                       print ($res) ;
+                       }
+                }
+              ) ;
diff --git a/t/snippets/git74.in b/t/snippets/git74.in
new file mode 100644 (file)
index 0000000..a6e2a51
--- /dev/null
@@ -0,0 +1,9 @@
+$self->func(
+  {
+    command  => [ 'command', 'argument1', 'argument2' ],
+    callback => sub {
+      my ($res) = @_;
+      print($res);
+    }
+  }
+);
diff --git a/t/snippets/git74.par b/t/snippets/git74.par
new file mode 100644 (file)
index 0000000..f82c454
--- /dev/null
@@ -0,0 +1,17 @@
+-xlp
+--iterations=2
+--maximum-line-length=120
+--line-up-parentheses
+--continuation-indentation=4
+--closing-token-indentation=1
+--want-left-space="= -> ( )"
+--want-right-space="= -> ( )"
+--space-function-paren
+--space-keyword-paren
+--space-terminal-semicolon
+--opening-brace-on-new-line
+--opening-sub-brace-on-new-line
+--opening-anonymous-sub-brace-on-new-line
+--brace-left-and-indent
+--brace-left-and-indent-list="*"
+--break-before-hash-brace=3
index a042024b5f9f9ad79944c43d22ddee7de0eddc71..086f629e648ea5c116430871607fd024c7a4b381 100644 (file)
 ../snippets25.t        braces.braces8
 ../snippets25.t        rt140025.def
 ../snippets25.t        rt140025.rt140025
+../snippets25.t        xlp1.def
+../snippets25.t        xlp1.xlp1
 ../snippets3.t ce_wn1.ce_wn
 ../snippets3.t ce_wn1.def
 ../snippets3.t colin.colin
 ../snippets9.t rt98902.def
 ../snippets9.t rt98902.rt98902
 ../snippets9.t rt99961.def
-../snippets25.t        xlp1.def
-../snippets25.t        xlp1.xlp1
+../snippets25.t        git74.def
+../snippets25.t        git74.git74
index 71e782c49a8e8ec16a0648245aa842dbae937322..0c848d01928c4b04e4732fb74e628ee6cc44f2e8 100644 (file)
@@ -12,6 +12,8 @@
 #9 rt140025.rt140025
 #10 xlp1.def
 #11 xlp1.xlp1
+#12 git74.def
+#13 git74.git74
 
 # To locate test #13 you can search for its name or the string '#13'
 
@@ -32,7 +34,26 @@ BEGIN {
         'braces8' => <<'----------',
 -bl -bbvt=1 -blxl=' ' -bll='sub do asub'
 ----------
-        'def'       => "",
+        'def'   => "",
+        'git74' => <<'----------',
+-xlp
+--iterations=2
+--maximum-line-length=120
+--line-up-parentheses
+--continuation-indentation=4
+--closing-token-indentation=1
+--want-left-space="= -> ( )"
+--want-right-space="= -> ( )"
+--space-function-paren
+--space-keyword-paren
+--space-terminal-semicolon
+--opening-brace-on-new-line
+--opening-sub-brace-on-new-line
+--opening-anonymous-sub-brace-on-new-line
+--brace-left-and-indent
+--brace-left-and-indent-list="*"
+--break-before-hash-brace=3
+----------
         'lp'        => "-lp",
         'novalign1' => "-novalign",
         'novalign2' => "-nvsc -nvbc -msc=2",
@@ -95,6 +116,18 @@ try {
 catch {
     die;
 };
+----------
+
+        'git74' => <<'----------',
+$self->func(
+  {
+    command  => [ 'command', 'argument1', 'argument2' ],
+    callback => sub {
+      my ($res) = @_;
+      print($res);
+    }
+  }
+);
 ----------
 
         'lp2' => <<'----------',
@@ -437,6 +470,39 @@ $cb1 = $act_page->Checkbutton(
 );
 #11...........
         },
+
+        'git74.def' => {
+            source => "git74",
+            params => "def",
+            expect => <<'#12...........',
+$self->func(
+    {
+        command  => [ 'command', 'argument1', 'argument2' ],
+        callback => sub {
+            my ($res) = @_;
+            print($res);
+        }
+    }
+);
+#12...........
+        },
+
+        'git74.git74' => {
+            source => "git74",
+            params => "git74",
+            expect => <<'#13...........',
+$self -> func (
+                {
+                   command  => [ 'command', 'argument1', 'argument2' ],
+                   callback => sub
+                       {
+                       my ($res) = @_ ;
+                       print ($res) ;
+                       }
+                }
+              ) ;
+#13...........
+        },
     };
 
     my $ntests = 0 + keys %{$rtests};