forked from gitpan/Text-MacroScript
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #40: Variables should accept expressions and compute them
- Loading branch information
1 parent
9b7d862
commit d37c93b
Showing
2 changed files
with
38 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/perl | ||
|
||
# Copyright (c) 2015 Paulo Custodio. All Rights Reserved. | ||
# May be used/distributed under the GPL. | ||
|
||
use strict; | ||
use warnings; | ||
use Test::More; | ||
|
||
use_ok 'Text::MacroScript'; | ||
|
||
my $ms; | ||
|
||
$ms = new_ok('Text::MacroScript'); | ||
is $ms->expand("%DEFINE_VARIABLE N1 [#N1+1]#N1"), "1"; | ||
is $ms->expand("%DEFINE_VARIABLE N1 [#N1+1]#N1"), "2"; | ||
is $ms->expand("%DEFINE_VARIABLE N1 [#N1+1]#N1"), "3"; | ||
|
||
done_testing; |
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