summaryrefslogtreecommitdiffstats
path: root/spec/unit/parser/scope.rb
Commit message (Collapse)AuthorAgeFilesLines
* Fixing a test broken by the regex featuresLuke Kanies2009-08-021-0/+14
| | | | | | | | Unsetting scope vars was broken, but it was only ever used in testing (and apparently rarely at that), so it wasn't caught. Signed-off-by: Luke Kanies <luke@madstop.com>
* Allow variable $0 to $9 to be interpolated, if ephemeralBrice Figureau2009-08-011-0/+30
| | | | Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Implement ephemeral scope variablesBrice Figureau2009-08-011-7/+61
| | | | | | | | | | Those variables have been created to be short lived and used mainly to define temporary special variables. They do not persist after a call to unset_ephemeral_var. Also Scope#set_ephemeral_from can be used to promote a regexp MatchData to ephemeral values. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Cleaning up scope tests a bitLuke Kanies2009-06-111-4/+3
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2336 - qualified variables only throw warningsLuke Kanies2009-06-111-4/+102
| | | | | | | | | We were previously throwing exceptions. This also ports all of the tests for variable lookup over to rspec. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fix #1828 - Scope.number? wasn't strict enough and could produce wrong resultsBrice Figureau2008-12-271-0/+14
| | | | | | | Some invalid numbers were treated as numbers and conversion to Integer was failing returning 0 (for instance 0.24.7). Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Add arithmetic operators to ASTBrice Figureau2008-09-301-0/+50
| | | | | This changeset adds +,-,/,*,<< and >> computation and AST parse nodes.
* Add rspec unit test for the append operatorBrice Figureau2008-09-211-0/+37
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>