summaryrefslogtreecommitdiff
path: root/lib/bio/test/bio-skipto.myr
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bio/test/bio-skipto.myr')
-rw-r--r--lib/bio/test/bio-skipto.myr12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/bio/test/bio-skipto.myr b/lib/bio/test/bio-skipto.myr
index 6a66d9c..862a896 100644
--- a/lib/bio/test/bio-skipto.myr
+++ b/lib/bio/test/bio-skipto.myr
@@ -21,6 +21,18 @@ const main = {
| `std.Err e: std.fatal("expected EOF, got {}\n", e)
;;
+ /* Ensure we find a delimiter if it spans a 16k boundary */
+ f = std.try(bio.open("data/bio-skipto-16kspan", bio.Rd))
+ if !bio.skipto(f, "ABCDE")
+ std.fatal("failed to find ABCDE spanning boundary")
+ ;;
+
+ /* Ensure we find a delimiter if it ends on a 16k boundary */
+ f = std.try(bio.open("data/bio-skipto-16kbound", bio.Rd))
+ if !bio.skipto(f, "ABCDE")
+ std.fatal("failed to find ABCDE at end of buffer")
+ ;;
+
std.put("success: all reads matched\n")
}