Skip to content

Commit

Permalink
fix(zencode): 🐛 deprecate rule caller restroom-mw in favour of rule u…
Browse files Browse the repository at this point in the history
…nknown ignore

Also remove rule collision ignore since it is not valid anymore
  • Loading branch information
matteo-cristino authored and jaromil committed Oct 18, 2023
1 parent e3ae3f3 commit 40c5840
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
6 changes: 1 addition & 5 deletions src/lua/zencode.lua
Original file line number Diff line number Diff line change
Expand Up @@ -269,13 +269,9 @@ function ZEN:begin(new_heap)
CONF.parser.strict_match = false
return true
end,
['collision ignore'] = function ()
CONF.heap.check_collision = false
return true
end,
['caller restroom-mw'] = function()
warn("DEPRECATED:\nRule caller restroom-mw\nuse instead\nRule unknown ignore")
CONF.parser.strict_match = false
CONF.heap.check_collision = false
return true
end,
['set'] = function (conf, value)
Expand Down
15 changes: 0 additions & 15 deletions test/zencode/rules.bats
Original file line number Diff line number Diff line change
Expand Up @@ -170,21 +170,6 @@ EOF
assert_output '{"result":"test_passed"}'
}

# --- caller restroom-mw --- #
@test "caller restroom-mw" {
cat <<EOF | zexe caller_restroom-mw.zen
Rule caller restroom-mw
Given nothing
When I test the rule with a statement that does not exist
and I also have a collision in data and keys
When I write string 'test passed' in 'result'
Then print the 'result'
EOF
save_output caller_restroom-mw_output.json
assert_output '{"result":"test_passed"}'
}

# --- set --- #
@test "set" {
cat << EOF | zexe set_hash.zen
Expand Down

0 comments on commit 40c5840

Please sign in to comment.