~ubuntu-branches/ubuntu/precise/padre/precise

« back to all changes in this revision

Viewing changes to xt/files/rename_variable_stress_test.pl

  • Committer: Bazaar Package Importer
  • Author(s): Damyan Ivanov
  • Date: 2010-12-11 20:56:34 UTC
  • mfrom: (1.3.1 upstream) (13.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20101211205634-sitpxguuf9cct47q
Tags: 0.76.ds1-1
* New upstream release

* bump liborlite (build-)dependency to 1.46
* bump libparse-errorstring-perl-perl (build-)dependency to 0.14
* bump libwx-perl-processstream-perl (build-)dependency to 0.29
* update the list of incomplete manuals

* Upload to unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
# this is nonsensical code which is intended to
 
3
# provide a base for manually stress-testing the
 
4
# find-variable-declaration and
 
5
# rename-variable
 
6
# functions.
 
7
# TODO: Proper unit-testification
 
8
 
 
9
my $foo;
 
10
while (!$foo) {
 
11
  my $bar;
 
12
  foreach my $i (0..100) {
 
13
    if ($i== 5) {
 
14
      $foo = 1;
 
15
      $bar += 1;
 
16
      my @bAz;
 
17
      my $bAz;
 
18
      my $baz = 4;
 
19
      my @baz = (5);
 
20
      my %baz = qw(a b);
 
21
      for (my $j = 0; $j < @baz; $j++) {
 
22
        $#baz--;
 
23
        $#bAz--;
 
24
        $bAz[2] = "blah $baz";
 
25
        $baz = "blub ${bAz} @bAz @{bAz}
 
26
                $bAz[0] $#bAz
 
27
                $baz{foo} @baz{foo}";
 
28
        $bAz++;
 
29
        $baz{foo} = "bar";
 
30
        @baz{bar} = ("hi");
 
31
      }
 
32
    }
 
33
  }
 
34
  if ($ARGV[0]) {
 
35
    print "hi";
 
36
  }
 
37
  if (rand() < 0.2) {
 
38
    $foo = 0;
 
39
    $bar -= 1;
 
40
  }
 
41
}
 
42
 
 
43