There are 9 test failures. I tried different versions of samtools with the same results.
══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test_bamUtils_ops.R:30:5'): read.bam ──────────────────────────────
length(tmp) not equal to 4999.
1/1 mismatches
[1] 4998 - 4999 == -1
── Failure ('test_bamUtils_ops.R:35:5'): read.bam ──────────────────────────────
nrow(tmp) not equal to 9998.
1/1 mismatches
[1] 9996 - 9998 == -2
── Failure ('test_bamUtils_ops.R:43:5'): read.bam ──────────────────────────────
length(tmp) not equal to 4999.
1/1 mismatches
[1] 4998 - 4999 == -1
── Failure ('test_bamUtils_ops.R:77:5'): read.bam ──────────────────────────────
length(read.bam(example_bam, all = TRUE, isPaired = TRUE)) not equal to 4999.
1/1 mismatches
[1] 4998 - 4999 == -1
── Failure ('test_bamUtils_ops.R:86:5'): read.bam ──────────────────────────────
length(read.bam(example_bam, all = TRUE, isProperPair = FALSE)) not equal to 656.
1/1 mismatches
[1] 655 - 656 == -1
── Failure ('test_bamUtils_ops.R:91:5'): read.bam ──────────────────────────────
length(read.bam(example_bam, all = TRUE, isUnmappedQuery = TRUE)) not equal to 365.
1/1 mismatches
[1] 364 - 365 == -1
── Failure ('test_bamUtils_ops.R:98:5'): read.bam ──────────────────────────────
length(read.bam(example_bam, all = TRUE, hasUnmappedMate = FALSE)) not equal to 4999.
1/1 mismatches
[1] 4998 - 4999 == -1
── Failure ('test_bamUtils_ops.R:104:5'): read.bam ─────────────────────────────
length(read.bam(example_bam, all = TRUE, isNotPassingQualityControls = FALSE)) not equal to 4999.
1/1 mismatches
[1] 4998 - 4999 == -1
── Failure ('test_bamUtils_ops.R:110:5'): read.bam ─────────────────────────────
length(read.bam(example_bam, all = TRUE, hasUnmappedMate = FALSE)) not equal to 4999.
1/1 mismatches
[1] 4998 - 4999 == -1
[ FAIL 9 | WARN 18 | SKIP 13 | PASS 68 ]
Error: Test failures
There are 9 test failures. I tried different versions of samtools with the same results.