add test case
authorSteve Hancock <perltidy@users.sourceforge.net>
Wed, 8 Sep 2021 13:52:44 +0000 (06:52 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Wed, 8 Sep 2021 13:52:44 +0000 (06:52 -0700)
t/snippets/expect/pretok.def
t/snippets/packing_list.txt
t/snippets/pretok.in
t/snippets24.t

index b210a06934002e25adfd66e637aca95d94468943..7e84f1d50296d41e65396ac44d602fa91d09bd5a 100644 (file)
@@ -1,11 +1,10 @@
 # test sub split_pretoken
-my $bb  = $^? ? "defined" : "not defined";
-my $aa  = $^ if ($bb);
-my $yes = $^O eq "linux";
-my $no  = $^O ne "linux";
-my $val = %^O;
-$str0 = 'hi' . 's' x 10 if (1);
-$str1 = 'merci' x 0.1e4 . $str0;
-$str2 = 'hi' . 's' x 10.2 . 'you';
-$str2 = 'hi' . 's' x 0.1e1;
-$str3 = 'tak' x 0 if ('bad');
+my $s1 = $^? ? "def" : "not def";
+my $s2 = $^  ? "def" : "not def";
+my $s3 = $^ if ($s2);
+my $s4 = $^O eq "linux";
+my $s5 = $^O ne "linux";
+my $s6 = $^O ne "linux";
+my $s7 = %^O;
+my $s8 = 'hi' . 's' x 10 if (1);
+my $s9 = 'merci' x 0.1e4 . $s8;
index e411f5b427bfeb19afe4ad2bf3c9ebda9ef75f4a..147bab5c76b18644ff4b45b1d93663e3c7179011 100644 (file)
 ../snippets24.t        code_skipping.def
 ../snippets24.t        git51.def
 ../snippets24.t        git51.git51
+../snippets24.t        pretok.def
 ../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
-../snippets24.t        pretok.def
index 874712db94c0ee506f0ada8489da1cfc103494b9..eae786acd0cfccee3780f35c5d6569242cdc366f 100644 (file)
@@ -1,11 +1,11 @@
 # test sub split_pretoken
-my $bb=$^??"defined":"not defined";
-my $aa=$^if($bb);
-my $yes=$^Oeq"linux";
-my $no=$  ^One"linux";
-my $val=% ^O;
-$str0='hi'.'s'x10if(1);
-$str1='merci'x0.1e4.$str0;
-$str2='hi'.'s'x10.2.'you';
-$str2='hi'.'s'x0.1e1;
-$str3='tak'x0if('bad');
+my$s1=$^??"def":"not def";
+my$s2=$^ ?"def":"not def";
+my$s3=$^if($s2);
+my$s4=$^Oeq"linux";
+my$s5=$  ^One"linux";
+my$s6=$
+  ^One"linux";
+my$s7=%^O;
+my$s8='hi'.'s'x10if(1);
+my$s9='merci'x0.1e4.$s8;
index 975caa1d4c3c6db527ae8fc10f796f77df4a3d09..f2b83778c6b8ef174f4ef748c3b88857c00a63b3 100644 (file)
@@ -283,16 +283,16 @@ my @vals = (
 
         'pretok' => <<'----------',
 # test sub split_pretoken
-my $bb=$^??"defined":"not defined";
-my $aa=$^if($bb);
-my $yes=$^Oeq"linux";
-my $no=$  ^One"linux";
-my $val=% ^O;
-$str0='hi'.'s'x10if(1);
-$str1='merci'x0.1e4.$str0;
-$str2='hi'.'s'x10.2.'you';
-$str2='hi'.'s'x0.1e1;
-$str3='tak'x0if('bad');
+my$s1=$^??"def":"not def";
+my$s2=$^ ?"def":"not def";
+my$s3=$^if($s2);
+my$s4=$^Oeq"linux";
+my$s5=$  ^One"linux";
+my$s6=$
+  ^One"linux";
+my$s7=%^O;
+my$s8='hi'.'s'x10if(1);
+my$s9='merci'x0.1e4.$s8;
 ----------
 
         'rt136417' => <<'----------',
@@ -945,16 +945,15 @@ Type::Libraries->setup_class(
             params => "def",
             expect => <<'#19...........',
 # test sub split_pretoken
-my $bb  = $^? ? "defined" : "not defined";
-my $aa  = $^ if ($bb);
-my $yes = $^O eq "linux";
-my $no  = $^O ne "linux";
-my $val = %^O;
-$str0 = 'hi' . 's' x 10 if (1);
-$str1 = 'merci' x 0.1e4 . $str0;
-$str2 = 'hi' . 's' x 10.2 . 'you';
-$str2 = 'hi' . 's' x 0.1e1;
-$str3 = 'tak' x 0 if ('bad');
+my $s1 = $^? ? "def" : "not def";
+my $s2 = $^  ? "def" : "not def";
+my $s3 = $^ if ($s2);
+my $s4 = $^O eq "linux";
+my $s5 = $^O ne "linux";
+my $s6 = $^O ne "linux";
+my $s7 = %^O;
+my $s8 = 'hi' . 's' x 10 if (1);
+my $s9 = 'merci' x 0.1e4 . $s8;
 #19...........
         },
     };