Skip to content
Nightinggale edited this page Jun 7, 2018 · 1 revision

What it does

Allows logical OR in test conditions, meaning you can patch if any condition is met, not the normal all conditions approach.


Why you want to use this

Can be used in cases where you want to reuse patch code. The most obvious is using FindFile and apply the same patch on multiple files. Can be used to make more complex test conditions when nested with AND and IfElse.


Tags

Tag Mandatory Type Default Description
tests yes list The list of operations to test

Pass condition

Pass if at least one operation in tests pass. Lazy testings is used, meaning if one operation passes, the rest of the list will not be tested. Putting slow test conditions late and/or likely to pass conditions first can be used to speed up patching.


Example

Setup useful to apply the same patch to two different files.

<li Class="ModCheck.OR">
    <tests>
        <li Class ="ModCheck.FindFile">
            <!-- some testing -->
        </li>
        <li Class ="ModCheck.FindFile">
            <!-- more testing -->
        </li>
    </tests>
</li>

Clone this wiki locally