Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
311 additions
and
0 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
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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
Test the API | ||
|
||
__END__ | ||
# NAME test feature enabled by bundle | ||
use feature (); | ||
BEGIN { | ||
print "default: ", join(" ", feature::features_enabled(0)), "\n"; | ||
print "unicode_strings ", feature::feature_enabled("unicode_strings", 0) ? "is" : "is not", | ||
" enabled\n"; | ||
print "bundle: ", feature::feature_bundle(0) // "undef", "\n"; | ||
} | ||
use v5.12; | ||
BEGIN { | ||
print "5.12: ", join(" ", feature::features_enabled(0)), "\n"; | ||
print "unicode_strings ", feature::feature_enabled("unicode_strings", 0) ? "is" : "is not", | ||
" enabled\n"; | ||
print "bundle: ", feature::feature_bundle(0) // "undef", "\n"; | ||
} | ||
EXPECT | ||
default: bareword_filehandles indirect multidimensional | ||
unicode_strings is not enabled | ||
bundle: default | ||
5.12: bareword_filehandles indirect multidimensional say state switch unicode_strings | ||
unicode_strings is enabled | ||
bundle: 5.11 | ||
######## | ||
# NAME test features enabled explicitly | ||
no feature "indirect"; | ||
BEGIN { | ||
print "no feature indirect: ", join(" ", feature::features_enabled(0)), "\n"; | ||
print "indirect ", feature::feature_enabled("indirect", 0) ? "is" : "is not", | ||
" enabled\n"; | ||
print "bundle: ", feature::feature_bundle(0) // "undef", "\n"; | ||
} | ||
use feature "unicode_strings"; | ||
BEGIN { | ||
print "added unicode_strings: ", join(" ", feature::features_enabled(0)), "\n"; | ||
print "unicode_strings ", feature::feature_enabled("unicode_strings", 0) ? "is" : "is not", | ||
" enabled\n"; | ||
print "bundle: ", feature::feature_bundle(0) // "undef", "\n"; | ||
} | ||
EXPECT | ||
no feature indirect: bareword_filehandles multidimensional | ||
indirect is not enabled | ||
bundle: undef | ||
added unicode_strings: bareword_filehandles multidimensional unicode_strings | ||
unicode_strings is enabled | ||
bundle: undef |