# implement outdenting preferences for keywords
%outdent_keyword = ();
- my @okw = split_words( $rOpts->{'outdent-keyword-okl'} );
+ my @okw = split_words( $rOpts->{'outdent-keyword-list'} );
unless (@okw) {
@okw = qw(next last redo goto return); # defaults
}
BEGIN {
my @q;
- # These tokens with = may be deleted for vertical aligmnemt
@q = ( ',', '=>', '#' );
@is_comma_or_comment{@q} = (1) x scalar(@q);
- # test -nola -okw
my $i;
LOOP: while ( $i = <FOTOS> ) {
chomp($i);
- # test -nola -okw
my $i;
LOOP: while ( $i = <FOTOS> ) {
chomp($i);
--- /dev/null
+ my $i;
+ LOOP: while ( $i = <FOTOS> ) {
+ chomp($i);
+ next unless $i;
+ fixit($i);
+ }
+
-# test -nola -okw
my $i;
LOOP: while ( $i = <FOTOS> ) {
chomp($i);
+# test -nola -okw
-nola -okw
--- /dev/null
+# test -okw and -okwl
+-okw -okwl='next'
../snippets9.t rt98902.def
../snippets9.t rt98902.rt98902
../snippets9.t rt99961.def
+../snippets20.t outdent.outdent2
'misc_tests' => <<'----------',
-sts -ssc -sfs -nsak="my for" -ndsm
----------
- 'outdent1' => "-nola -okw",
+ 'outdent1' => <<'----------',
+# test -nola -okw
+-nola -okw
+----------
'sbq0' => "-sbq=0",
'sbq2' => "-sbq=2",
'scbb' => "-scbb",
----------
'outdent' => <<'----------',
-# test -nola -okw
my $i;
LOOP: while ( $i = <FOTOS> ) {
chomp($i);
source => "outdent",
params => "def",
expect => <<'#2...........',
- # test -nola -okw
my $i;
LOOP: while ( $i = <FOTOS> ) {
chomp($i);
source => "outdent",
params => "outdent1",
expect => <<'#3...........',
- # test -nola -okw
my $i;
LOOP: while ( $i = <FOTOS> ) {
chomp($i);
#10 gnu6.gnu
#11 git25.def
#12 git25.git25
+#13 outdent.outdent2
# To locate test #13 you can search for its name or the string '#13'
# BEGIN SECTION 1: Parameter combinations #
###########################################
$rparams = {
- 'ce' => "-cuddled-blocks",
- 'def' => "",
- 'git25' => "-l=0",
- 'gnu' => "-gnu",
+ 'ce' => "-cuddled-blocks",
+ 'def' => "",
+ 'git25' => "-l=0",
+ 'gnu' => "-gnu",
+ 'outdent2' => <<'----------',
+# test -okw and -okwl
+-okw -okwl='next'
+----------
'space6' => <<'----------',
-nwrs="+ - / *"
-nwls="+ - / *"
'foo10' => undef,
};
+----------
+
+ 'outdent' => <<'----------',
+ my $i;
+ LOOP: while ( $i = <FOTOS> ) {
+ chomp($i);
+ next unless $i;
+ fixit($i);
+ }
+
----------
'space6' => <<'----------',
#12...........
},
+
+ 'outdent.outdent2' => {
+ source => "outdent",
+ params => "outdent2",
+ expect => <<'#13...........',
+ my $i;
+ LOOP: while ( $i = <FOTOS> ) {
+ chomp($i);
+ next unless $i;
+ fixit($i);
+ }
+
+#13...........
+ },
};
my $ntests = 0 + keys %{$rtests};