Acme-FSM

 view release on metacpan or  search on metacpan

t/base/query_switch.t  view on Meta::CPAN

  sub {                                                $bb, { } },
  [                                                             ],
                                           qr.\Q isa (Acme::FSM).,
  { noted =>
      qr.(?m)\Q[query_switch]: {START}{switch} isa (Acme::FSM). }     ],
 [  q|{switch} isa (CODE), {namespace} unset, returns TRUE, no arg|,
  [qw|                                                pass noise |],
  sub {                                      push_push( !0 ), { } },
  [                                                               ],
  sub {                       $bb->{RCS}, exists $bb->{CSSC}, $rc },
  [                                      q|m_files|, '', q|tturn| ],
  { noted => qr.(?m)\Q[query_switch]: {START}{switch} isa (CODE). }   ],
 [     q|{switch} isa (CODE), {namespace} unset, returns TRUE, arg|,
  [qw|                                                pass noise |],
  sub {                                                undef, { } },
  [qw|                                                   Civetta |],
  sub {                                @$bb{qw| RCS CSSC |}, @$rc },
  [qw|                       archipel Civetta tturn superversion |],
  { noted => qr.(?m)\Q[query_switch]: {START}{switch} isa (CODE). }   ],
 [ q|{switch} isa (CODE), {namespace} unset, returns FALSE, no arg|,
  [qw|                                                pass noise |],
  sub {                                      push_push( !1 ), { } },
  [                                                               ],
  sub {                       $bb->{RCS}, exists $bb->{CSSC}, $rc },
  [                                    q|mercurial|, '', q|fturn| ],
  { noted => qr.(?m)\Q[query_switch]: {START}{switch} isa (CODE). }   ],
 [    q|{switch} isa (CODE), {namespace} unset, returns FALSE, arg|,
  [qw|                                                pass noise |],
  sub {                                                undef, { } },
  [qw|                                                      Onda |],
  sub {                                @$bb{qw| RCS CSSC |}, @$rc },
  [qw|                             surround_SCM Onda fturn asvcs |],
  { noted => qr.(?m)\Q[query_switch]: {START}{switch} isa (CODE). }   ],
 [                      q|{switch} isa (CODE), {namespace} isa set|,
  [qw|                                                pass noise |],
  sub {                push_push( !0 ), { namespace => q|vesta| } },
  [                                                               ],
  sub {                       $bb->{RCS}, exists $bb->{CSSC}, $rc },
  [                                         q|dcvs|, '', q|tturn| ],
  { noted => qr.(?m)\Q[query_switch]: {START}{switch} isa (CODE). }   ],
 [    q|{switch} isa (CODE), {namespace} isa set, argument isa set|,
  [qw|                                                pass noise |],
  sub {                          undef, { namespace => q|vesta| } },
  [qw|                          allfusion_harvest_change_manager |],
  sub {                                @$bb{qw| RCS CSSC |}, @$rc },
  [qw|        so6 allfusion_harvest_change_manager tturn fastcst |],
  { noted => qr.(?m)\Q[query_switch]: {START}{switch} isa (CODE). }   ],
 [                 q|{switch} isa (), {namespace} !isa defined|,
  [qw|                                            fail noise |],
  sub {                                    q|snapshotcm|, { } },
  [                                                           ],
                                qr.\Q {namespace} !isa defined.,
  { noted => qr.(?m)\Q[query_switch]: {START}{switch} isa (). },      ],
 [    q|{switch} !isa defined method, {namespace} eq ()|,
  [qw|                               fail noise noise |],
  sub                                                 {
      $t::TestSuite::class_cheat = q|t::TestSuite::FSM|;
                     q|hsup_hsup|, { namespace => '' } },
  [                                                    ],
    qr.\Q <t::TestSuite::FSM> can't [hsup_hsup] method .,
  { defaulting =>        qr.(?xm)\[query_switch\]:\s
      defaulting\s\{START\}\{switch\}\sto\s\x24self.,
    defaulted  =>        qr.(?xm)\[query_switch\]:\s
           \{namespace\}\sisa\s\(t::TestSuite::FSM\).  }              ],
 [    q|{switch} isa defined method, {namespace} eq ()|,
  [qw|                                    pass noise |],
  sub {             q|push_push|, { namespace => '' } },
  [                                                   ],
  sub {         $bb->{MKS}, exists $bb->{CS_RCS}, $rc },
  [                              q|arx|, '', q|tturn| ],
  { noted =>             qr.(?xm)\[query_switch\]:\s
      going\sfor\s<t::TestSuite::FSM>->\[push_push\]. }               ],
 [q|{switch} isa defined method, {namespace} eq (), argument is set|,
  [qw|                                                 pass noise |],
  sub {                                 undef, { namespace => '' } },
  [qw|                                                      darcs |],
  sub {                               @$bb{qw| MKS CS_RCS |}, @$rc },
  [qw|                           cvsnt darcs tturn sourceanywhere |],
  { noted =>             qr.(?xm)\[query_switch\]:\s
      going\sfor\s<t::TestSuite::FSM>->\[push_push\].              }  ],
 [                      q|{switch} !isa defined method, | .
                q|{namespace} isa (t::TestSuite::switch)|,
  [qw|                                fail noise noise |],
  sub {
      $switch = t::TestSuite::switch->new;
      undef $t::TestSuite::class_cheat;
                 q|hsup_hsup|, { namespace => $switch } },
  [                                                     ],
  qr.\Q <t::TestSuite::switch> can't [hsup_hsup] method .,
  { -misdefaulting =>  qr.(?xm)\[query_switch\]:\s
              defaulting\s\{switch\}\sto\s\x24self.,
    noted          =>  qr.(?xm)\[query_switch\]:\s
      \{namespace\}\sisa\s\(t::TestSuite::switch\).     }             ],
 [                        q|{switch} isa defined method, | .
                 q|{namespace} isa (t::TestSuite::switch)|,
  [qw|                                       pass noise |],
  sub {           q|push_push|, { namespace => $switch } },
  [                                                      ],
  sub {
      $switch->{jedi_vcs}, exists $switch->{gat}, exists $bb->{MKS},
        $rc                                              },
  [                          q|opencm|, '', '', q|tturn| ],
  { noted =>                qr.(?xm)\[query_switch\]:\s
      going\sfor\s<t::TestSuite::switch>->\[push_push\]. }            ],
 [                             q|{switch} isa defined method, | .
     q|{namespace} isa (t::TestSuite::switch), argument is set|,
  [qw|                                            pass noise |],
  sub {                       undef, { namespace => $switch } },
  [qw|                                serena_version_manager |],
  sub { @$switch{qw| jedi_vcs gat |}, exists $bb->{MKS}, @$rc },
  [qw| cvs serena_version_manager |, '', qw| tturn codeville |],
  { noted =>                qr.(?xm)\[query_switch\]:\s
      going\sfor\s<t::TestSuite::switch>->\[push_push\].      }       ],
 [                             q|{switch} !isa defined subroutine, | .
                            q|{namespace} eq (t::TestSuite::switch)|,
  [qw|                                           fail noise noise |],
  sub {     q|hsup_hsup|, { namespace => q|t::TestSuite::switch| } },
  [                                                                ],
                                        qr.(?xm)\[query_switch\]:\s
              <t::TestSuite::switch>\spackage\scan't\s\[hsup_hsup\].,
  { -misdefaulting =>
       qr.(?m)\Q[query_switch]: defaulting {switch} to \E\x24self.,
    scalar_noted   => qr.(?m)\Q[query_switch]: {namespace} isa (). }  ],
 [                          q|{switch} isa defined subroutine, | .
                        q|{namespace} eq (t::TestSuite::switch)|,
  [qw|                                             pass noise |],
  sub { q|push_push|, { namespace => q|t::TestSuite::switch| } },
  [                                                            ],
  sub {                $bb->{jedi_vcs}, exists $bb->{MKS}, $rc },
  [                               q|controltier|, '', q|tturn| ],
  { noted =>                qr.(?xm)\[query_switch\]:\s
      going\sfor\s<t::TestSuite::switch>::\[push_push\].       }      ],
 [                     q|{switch} isa defined subroutine, | .
  q|{namespace} eq (t::TestSuite::switch), argument is set|,
  [qw|                                        pass noise |],
  sub {   undef, { namespace => q|t::TestSuite::switch| } },
  [qw|                                              TLIB |],
  sub { @$bb{qw| jedi_vcs gat |}, exists $bb->{MKS}, @$rc },
  [qw|            rmtrcs TLIB |, '', qw| tturn ic_manage |],
  { noted =>                qr.(?xm)\[query_switch\]:\s
      going\sfor\s<t::TestSuite::switch>::\[push_push\].  }           ],
 [q|no turns, {switch} returns empty|,
  [qw|                        pass |],
  sub {                sub { }, { } },
  [                                 ],
  sub {                         $rc },
  [qw|                       uturn |]                                 ],
 [q|no turns, {switch} returns empty, argument is set|,
  [qw|                                         pass |],
  sub {                                 sub { }, { } },
  [qw|                                    clearcase |],
  sub {                                          $rc },
  [qw|                                        uturn |]                ],
 [q|no turns, {switch} returns explicit (undef)|,
  [qw|                                   pass |],
  sub {                     sub { undef }, { } },
  [                                            ],
  sub {                                    $rc },
  [qw|                                  uturn |]                      ],
 [q|no turns, {switch} returns explicit (undef), argument is set|,
  [qw|                                                    pass |],
  sub {                                      sub { undef }, { } },
  [qw|                                               clearcase |],
  sub {                                                     $rc },
  [qw|                                                   uturn |]     ],
 [q|no turns, {switch} returns empty string|,
  [qw|                               pass |],
  sub {                    sub { '' }, { } },
  [                                        ],
  sub {                                $rc },
  [qw|                              fturn |],                         ],
 [q|no turns, {switch} returns empty string, argument is set|,
  [qw|                                                pass |],
  sub {                                     sub { '' }, { } },
  [qw|                              team_foundation_server |],
  sub {                                                 $rc },
  [qw|                                               fturn |]         ],
 [q|no turns, {switch} returns nil|,
  [qw|                      pass |],
  sub {            sub { 0 }, { } },
  [                               ],
  sub {                       $rc },



( run in 1.010 second using v1.01-cache-2.11-cpan-39bf76dae61 )