mirror of
https://github.com/irmen/prog8.git
synced 2026-10-22 05:02:58 +00:00
missing file
This commit is contained in:
1 parent
1c376aa9d1
commit
1b4635d27e
2 files changed
+19
-1
No files matched your search
@@ -0,0 +1,18 @@
|
||||
package prog8tests.helpers
|
||||
|
||||
import io.kotest.assertions.fail
|
||||
|
||||
/**
|
||||
* Asserts that the string contains the given [substrings] in the specified order.
|
||||
* This is much faster than using a large multi-line Regex.
|
||||
*/
|
||||
fun String.shouldContainInOrder(vararg substrings: String) {
|
||||
var currentSearchIndex = 0
|
||||
for (substring in substrings) {
|
||||
val index = this.indexOf(substring, currentSearchIndex)
|
||||
if (index == -1) {
|
||||
fail("Could not find '$substring' after index $currentSearchIndex in string:\n$this")
|
||||
}
|
||||
currentSearchIndex = index + substring.length
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -2,5 +2,5 @@
|
||||
|
||||
rm -f *.bin *.xex *.jar *.asm *.prg *.vm.txt *.vice-mon-list *.list *.p8ir a.out imgui.ini
|
||||
rm -rf build out
|
||||
rm -rf compiler/build codeGenCpu6502/build codeGenExperimental/build codeGenIntermediate/build intermediate/build virtualmachine/build codeOptimizers/build compilerAst/build parser/build parser/src/prog8/parser
|
||||
rm -rf compiler/build codeGenCpu6502/build codeGenExperimental/build codeGenIntermediate/build intermediate/build virtualmachine/build codeOptimizers/build compilerAst/build languageServer/build parser/build parser/src/prog8/parser
|
||||
|
||||
Reference in new issue
Block a user