-
Notifications
You must be signed in to change notification settings - Fork 0
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
2 changed files
with
74 additions
and
5 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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
use t; | ||
|
||
t q(use Foo 'bar'), 'Unused import of "bar" from Foo at line 1.'; | ||
t q(use Foo 'bar'; bar); | ||
|
||
t q(use Foo "bar"), 'Unused import of "bar" from Foo at line 1.'; | ||
t q(use Foo "bar"; bar); | ||
|
||
t q(use Foo qw/bar/), 'Unused import of "bar" from Foo at line 1.'; | ||
t q(use Foo qw/bar/; bar); | ||
|
||
# Funcs with the same name as builtins are fun. | ||
t q(use Time::HiRes 'time'), | ||
'Unused import of "time" from Time::HiRes at line 1.'; | ||
t q(use Time::HiRes 'time'; time); | ||
|
||
# False positives. | ||
t q(use lib 'lib'); | ||
t q(use warnings 'all'); | ||
|
||
t q(use Exporter 'import'); | ||
t q(use Getopt::Long qw/:config bundling/); | ||
t q(use Regexp::Common 'number'); | ||
|
||
done; |