return;
}
- # c414: do not join a '\' and a closing ')' for example like here:
+ # c414 and c424: do not join a '\' and a closing ')' like here:
# my @clock_chars = qw( | / - \ | / - \ );
if (
@words
&& $closing
&& substr( $words[-1], -1, 1 ) eq BACKSLASH
- && ( $tightness{')'} == 2
- || $tightness{')'} == 1 && @words == 1 )
+ && (
+ !$rOpts_add_whitespace
+ || ( $tightness{')'} == 2
+ || $tightness{')'} == 1 && @words == 1 )
+ )
)
{
# fix by including a space after the \
$words[-1] .= SPACE;
# and for symmetry, before the first word if the '(' is on this line
- if ($opening) { $words[0] = SPACE . $words[0] }
+ if ( $opening && $rOpts_add_whitespace ) {
+ $words[0] = SPACE . $words[0];
+ }
}
#---------------------------------------------------------------------
# indentation of a line in the Formatter.
#--------------------------------------------------------------
+ # Given:
+ # ($ibeg, $iend) = index range of tokens on this line
+ # $rindentation_list = ref to indentation of each line in this batch,
+ # to be updated by this sub
+ # $level_jump = level change to $token $ibeg from previous token
+
# It starts with the basic indentation which has been defined for the
# leading token, and then takes into account any options that the user
# has set regarding special indenting and outdenting.
--- /dev/null
+my @chars = qw( | / - \ | / - \ );
+my @chars = qw(| / - \ | / - \ );
--- /dev/null
+-naws -qwaf
--- /dev/null
+my @chars = qw( | / - \ | / - \ );
+my @chars = qw(| / - \ | / - \ );
--- /dev/null
+my @chars = qw( | / - \ | / - \ );
+my @chars = qw(| / - \ | / - \ );
../snippets30.t git162.git162
../snippets30.t qwaf.def
../snippets30.t qwaf.qwaf
+../snippets30.t btct.btct1
+../snippets31.t btct.btct2
+../snippets31.t btct.btct3
+../snippets31.t btct.def
../snippets4.t gnu1.gnu
../snippets4.t gnu2.def
../snippets4.t gnu2.gnu
../snippets9.t rt98902.def
../snippets9.t rt98902.rt98902
../snippets9.t rt99961.def
-../snippets30.t btct.btct1
-../snippets31.t btct.btct2
-../snippets31.t btct.btct3
-../snippets31.t btct.def
+../snippets31.t c424.c424
+../snippets31.t c424.def
#1 btct.btct2
#2 btct.btct3
#3 btct.def
+#4 c424.c424
+#5 c424.def
# To locate test #13 you can search for its name or the string '#13'
$rparams = {
'btct2' => "-btct=1 -atc -wtc=1",
'btct3' => "-btct=1 -atc -wtc=1",
+ 'c424' => "-naws -qwaf",
'def' => "",
};
$w->bind( '<Page_Down>' => xx);
$lut = byte [ [ 0, 0, 0 ], [ 10, 1, 10 ], [ 2, 20, 20 ], [ 30, 30, 3 ], ];
+----------
+
+ 'c424' => <<'----------',
+my @chars = qw( | / - \ | / - \ );
+my @chars = qw(| / - \ | / - \ );
----------
};
$lut = byte [ [ 0, 0, 0 ], [ 10, 1, 10 ], [ 2, 20, 20 ], [ 30, 30, 3 ], ];
#3...........
},
+
+ 'c424.c424' => {
+ source => "c424",
+ params => "c424",
+ expect => <<'#4...........',
+my @chars = qw( | / - \ | / - \ );
+my @chars = qw(| / - \ | / - \ );
+#4...........
+ },
+
+ 'c424.def' => {
+ source => "c424",
+ params => "def",
+ expect => <<'#5...........',
+my @chars = qw( | / - \ | / - \ );
+my @chars = qw(| / - \ | / - \ );
+#5...........
+ },
};
my $ntests = 0 + keys %{$rtests};