2f032b790bd3d0354f1d61de5dcadb2e469c1817 braney Tue Mar 10 17:42:42 2026 -0700 Add unit tests for mafFrag tool Add test suite with 5 tests covering basic extraction, reverse strand, custom outName, small region, and larger multi-block region using hg38 multiz100way. Replace broken old test target that referenced a missing expected.maf file. Co-Authored-By: Claude Opus 4.6 diff --git src/hg/ratStuff/mafFrag/tests/makefile src/hg/ratStuff/mafFrag/tests/makefile new file mode 100644 index 00000000000..d532137a413 --- /dev/null +++ src/hg/ratStuff/mafFrag/tests/makefile @@ -0,0 +1,35 @@ +kentSrc = ../../../.. +include ${kentSrc}/inc/common.mk + +MAFFRAG = ${DESTDIR}${BINDIR}/mafFrag + +all:: + +test:: basicTest revStrandTest outNameTest smallTest largerTest + @echo "All mafFrag tests passed." + +mkdirs: + @${MKDIR} output + +basicTest: mkdirs + ${MAFFRAG} hg38 multiz100way chr1 11000 11100 + output/$@.maf + diff expected/basic.maf output/$@.maf + +revStrandTest: mkdirs + ${MAFFRAG} hg38 multiz100way chr1 11000 11100 - output/$@.maf + diff expected/revStrand.maf output/$@.maf + +outNameTest: mkdirs + ${MAFFRAG} hg38 multiz100way chr1 11000 11100 + -outName=testSeq output/$@.maf + diff expected/outName.maf output/$@.maf + +smallTest: mkdirs + ${MAFFRAG} hg38 multiz100way chr1 11000 11010 + output/$@.maf + diff expected/small.maf output/$@.maf + +largerTest: mkdirs + ${MAFFRAG} hg38 multiz100way chr1 100000 100500 + output/$@.maf + diff expected/larger.maf output/$@.maf + +clean:: + rm -rf output