-
Notifications
You must be signed in to change notification settings - Fork 95
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
Swamp Ig
committed
May 10, 2014
1 parent
979ec0a
commit 40e5aad
Showing
3 changed files
with
131 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
|
||
MMTEST | ||
{ | ||
name = valueEdit | ||
MODULE | ||
{ | ||
name = module1 | ||
multiVal = one | ||
multiVal = two | ||
numeric = 0 | ||
} | ||
} | ||
|
||
// Adds value to module2 | ||
@MMTEST[valueEdit] | ||
{ | ||
// Copy new module 2 | ||
@MODULE[module1] | ||
{ | ||
// Unindexed | ||
@name = module2 | ||
// Unindexed for multi - defaults to zero | ||
@multiVal = oneEdit | ||
// regexp with index | ||
@multiVal,1 ^= :tw:mo: | ||
// Arithmetic | ||
@numeric += 5 | ||
@numeric *= 20 | ||
} | ||
} | ||
|
||
MMTEST_EXPECT | ||
{ | ||
MMTEST | ||
{ | ||
name = valueEdit | ||
MODULE | ||
{ | ||
name = module2 | ||
multiVal = oneEdit | ||
multiVal = moo | ||
numeric = 100 | ||
} | ||
} | ||
} |
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,45 @@ | ||
|
||
MMTEST | ||
{ | ||
name = valueInsert | ||
MODULE | ||
{ | ||
name = module1 | ||
multiVal = one | ||
multiVal = two | ||
numeric = 0 | ||
} | ||
} | ||
|
||
// Adds value to module2 | ||
@MMTEST[valueInsert] | ||
{ | ||
// Copy new module 2 | ||
@MODULE[module1] | ||
{ | ||
// Unindexed | ||
multiVal = three | ||
// Indexed | ||
multiVal,0 = zero | ||
// Indexed off end | ||
multiVal,999 = four | ||
} | ||
} | ||
|
||
MMTEST_EXPECT | ||
{ | ||
MMTEST | ||
{ | ||
name = valueInsert | ||
MODULE | ||
{ | ||
name = module1 | ||
numeric = 0 | ||
multiVal = zero | ||
multiVal = one | ||
multiVal = two | ||
multiVal = three | ||
multiVal = four | ||
} | ||
} | ||
} |
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,41 @@ | ||
|
||
MMTEST | ||
{ | ||
name = valueReplace | ||
MODULE | ||
{ | ||
name = module1 | ||
multiVal = one | ||
multiVal = two | ||
numeric = 0 | ||
} | ||
} | ||
|
||
// Adds value to module2 | ||
@MMTEST[valueReplace] | ||
{ | ||
// Copy new module 2 | ||
@MODULE[module1] | ||
{ | ||
// Replace has by nature pretty limited capabilities | ||
// value present | ||
%multiVal = replaced | ||
// Value not present | ||
%hedgehog = spiky | ||
} | ||
} | ||
|
||
MMTEST_EXPECT | ||
{ | ||
MMTEST | ||
{ | ||
name = valueReplace | ||
MODULE | ||
{ | ||
name = module1 | ||
numeric = 0 | ||
multiVal = replaced | ||
hedgehog = spiky | ||
} | ||
} | ||
} |