Add pattern statement

This commit is contained in:
josh committed 2022-09-30 21:05:18 -04:00
1 parent 04367db0ac
commit e7e30c4f28
5 files changed
+51 -8

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
import testparser;
import std.stdio;
int main()
{
return 0;
}
unittest
{
string input = "abcdef";
auto parser = new Testparser.Parser(cast(const(ubyte) *)input.ptr, input.length);
assert(parser.parse() == true);
input = "defabcdef";
parser = new Testparser.Parser(cast(const(ubyte) *)input.ptr, input.length);
assert(parser.parse() == true);
}