Skip to content

Commit

Permalink
Completed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Swamp Ig committed May 10, 2014
1 parent 979ec0a commit 40e5aad
Show file tree
Hide file tree
Showing 3 changed files with 131 additions and 0 deletions.
45 changes: 45 additions & 0 deletions Tests/ValueEdit.cfg
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
}
}
}
45 changes: 45 additions & 0 deletions Tests/ValueInsert.cfg
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
}
}
}
41 changes: 41 additions & 0 deletions Tests/ValueReplace.cfg
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
}
}
}

0 comments on commit 40e5aad

Please sign in to comment.