-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove inline tests from PPI::Toke::Pod
- Loading branch information
1 parent
6279fbb
commit 324b993
Showing
2 changed files
with
31 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,31 @@ | ||
#!/usr/bin/perl | ||
|
||
# Unit testing for PPI, generated by Test::Inline | ||
|
||
use strict; | ||
use File::Spec::Functions ':ALL'; | ||
BEGIN { | ||
$| = 1; | ||
$^W = 1; | ||
no warnings 'once'; | ||
$PPI::XS_DISABLE = 1; | ||
$PPI::Lexer::X_TOKENIZER ||= $ENV{X_TOKENIZER}; | ||
} | ||
use PPI; | ||
|
||
# Execute the tests | ||
use Test::More tests => 4; | ||
|
||
# =begin testing merge after PPI::Node 4 | ||
{ | ||
# Create the test fragments | ||
my $one = PPI::Token::Pod->new("=pod\n\nOne\n\n=cut\n"); | ||
my $two = PPI::Token::Pod->new("=pod\n\nTwo"); | ||
isa_ok( $one, 'PPI::Token::Pod' ); | ||
isa_ok( $two, 'PPI::Token::Pod' ); | ||
|
||
# Create the combined Pod | ||
my $merged = PPI::Token::Pod->merge($one, $two); | ||
isa_ok( $merged, 'PPI::Token::Pod' ); | ||
is( $merged->content, "=pod\n\nOne\n\nTwo\n\n=cut\n", 'Merged POD looks ok' ); | ||
} | ||
|
||
|
||
1; | ||
#!/usr/bin/perl | ||
|
||
use warnings; | ||
use strict; | ||
use File::Spec::Functions ':ALL'; | ||
BEGIN { | ||
$| = 1; | ||
$^W = 1; | ||
no warnings 'once'; | ||
$PPI::XS_DISABLE = 1; | ||
$PPI::Lexer::X_TOKENIZER ||= $ENV{X_TOKENIZER}; | ||
} | ||
use PPI; | ||
|
||
use Test::More tests => 4; | ||
|
||
{ | ||
# Create the test fragments | ||
my $one = PPI::Token::Pod->new("=pod\n\nOne\n\n=cut\n"); | ||
my $two = PPI::Token::Pod->new("=pod\n\nTwo"); | ||
isa_ok( $one, 'PPI::Token::Pod' ); | ||
isa_ok( $two, 'PPI::Token::Pod' ); | ||
|
||
# Create the combined Pod | ||
my $merged = PPI::Token::Pod->merge($one, $two); | ||
isa_ok( $merged, 'PPI::Token::Pod' ); | ||
is( $merged->content, "=pod\n\nOne\n\nTwo\n\n=cut\n", 'Merged POD looks ok' ); | ||
} | ||
|
||
|
||
1; |