From 097416217bef15baf32cf274865f200ba217e232 Mon Sep 17 00:00:00 2001
From: Thomas Debesse <dev@illwieckz.net>
Date: Thu, 11 Jul 2024 05:27:10 +0200
Subject: [PATCH] test: add more tests, check some output, improve readability

---
 test/checksums.tsv |  89 +++++++++
 test/test.py       | 447 +++++++++++++++++++++++++++++++++++----------
 2 files changed, 444 insertions(+), 92 deletions(-)
 create mode 100644 test/checksums.tsv

diff --git a/test/checksums.tsv b/test/checksums.tsv
new file mode 100644
index 00000000..bc225bc8
--- /dev/null
+++ b/test/checksums.tsv
@@ -0,0 +1,89 @@
+build/test/png-to-all/unvanquished_64.tga	34434170b06843b2d4fb5964a4b8751ec3a151a7d03e351e45a5967508f6a21f6e40ffc214bb46640105c4058bc35e196ecb5dd3261528a64acfeff52034fb40
+build/test/png-to-all/unvanquished_64.bmp	1c5f28be8151a8125346e9cf17b1bf6e3f9fe27f6947b164b7eefa8fd3732a2e4dff173c354a0cd4ed599cd604d4b8f916c0575b0a4b4b508acc68dc9b4067ae
+build/test/png-to-all/unvanquished_64.png	71bb28da97cd778b99f131acaeb1c28ea37bae295a9e9934bed339508d8428587120c0da8f5bbc7963cdb77741ef789414f9d0d2c1e0da46026336efde147cc5
+build/test/png-to-all/unvanquished_64.crn	a3b526e95f44b6a4c919bc8eb79f4debf592f0bccc163c900cd1b6f9add0ce58c3db9fc8dac1828d350bbcd915823d7743a0c114a533fbc08c163fcb4846d2f5
+build/test/png-to-all/unvanquished_64.dds	ce98b21c574b4883e4aff4a0b92fd0f533f22e00ab753686f353111fa7503287c2c4dba25f2c2670508630d79b59464578e094461bad81ad803e1d58ed5e69f8
+build/test/png-to-all/unvanquished_64.ktx	d82eab591163d802231722ef325571735971b6a9b0703ed8ea59b4a4144189825d96d3455605426453fb3ad8d7cc61f931c52b3e73df2bb6787f7408baeb4ac7
+build/test/png-to-all/unvanquished_64.jpg	6cd22de7e2e5baced5ef16e84f816dde3049f822459d552ced4dcd4e3f9a16be82ee0747ed1479fe8339991176004b4ccc90380b7ef51292c7d9b518503a348d
+build/test/tga-to-all/unvanquished_64.tga	34434170b06843b2d4fb5964a4b8751ec3a151a7d03e351e45a5967508f6a21f6e40ffc214bb46640105c4058bc35e196ecb5dd3261528a64acfeff52034fb40
+build/test/tga-to-all/unvanquished_64.bmp	1c5f28be8151a8125346e9cf17b1bf6e3f9fe27f6947b164b7eefa8fd3732a2e4dff173c354a0cd4ed599cd604d4b8f916c0575b0a4b4b508acc68dc9b4067ae
+build/test/tga-to-all/unvanquished_64.png	71bb28da97cd778b99f131acaeb1c28ea37bae295a9e9934bed339508d8428587120c0da8f5bbc7963cdb77741ef789414f9d0d2c1e0da46026336efde147cc5
+build/test/tga-to-all/unvanquished_64.crn	a3b526e95f44b6a4c919bc8eb79f4debf592f0bccc163c900cd1b6f9add0ce58c3db9fc8dac1828d350bbcd915823d7743a0c114a533fbc08c163fcb4846d2f5
+build/test/tga-to-all/unvanquished_64.dds	ce98b21c574b4883e4aff4a0b92fd0f533f22e00ab753686f353111fa7503287c2c4dba25f2c2670508630d79b59464578e094461bad81ad803e1d58ed5e69f8
+build/test/tga-to-all/unvanquished_64.ktx	d82eab591163d802231722ef325571735971b6a9b0703ed8ea59b4a4144189825d96d3455605426453fb3ad8d7cc61f931c52b3e73df2bb6787f7408baeb4ac7
+build/test/tga-to-all/unvanquished_64.jpg	6cd22de7e2e5baced5ef16e84f816dde3049f822459d552ced4dcd4e3f9a16be82ee0747ed1479fe8339991176004b4ccc90380b7ef51292c7d9b518503a348d
+build/test/bmp-to-all/unvanquished_64.tga	34434170b06843b2d4fb5964a4b8751ec3a151a7d03e351e45a5967508f6a21f6e40ffc214bb46640105c4058bc35e196ecb5dd3261528a64acfeff52034fb40
+build/test/bmp-to-all/unvanquished_64.bmp	1c5f28be8151a8125346e9cf17b1bf6e3f9fe27f6947b164b7eefa8fd3732a2e4dff173c354a0cd4ed599cd604d4b8f916c0575b0a4b4b508acc68dc9b4067ae
+build/test/bmp-to-all/unvanquished_64.png	71bb28da97cd778b99f131acaeb1c28ea37bae295a9e9934bed339508d8428587120c0da8f5bbc7963cdb77741ef789414f9d0d2c1e0da46026336efde147cc5
+build/test/bmp-to-all/unvanquished_64.crn	a3b526e95f44b6a4c919bc8eb79f4debf592f0bccc163c900cd1b6f9add0ce58c3db9fc8dac1828d350bbcd915823d7743a0c114a533fbc08c163fcb4846d2f5
+build/test/bmp-to-all/unvanquished_64.dds	ce98b21c574b4883e4aff4a0b92fd0f533f22e00ab753686f353111fa7503287c2c4dba25f2c2670508630d79b59464578e094461bad81ad803e1d58ed5e69f8
+build/test/bmp-to-all/unvanquished_64.ktx	d82eab591163d802231722ef325571735971b6a9b0703ed8ea59b4a4144189825d96d3455605426453fb3ad8d7cc61f931c52b3e73df2bb6787f7408baeb4ac7
+build/test/bmp-to-all/unvanquished_64.jpg	6cd22de7e2e5baced5ef16e84f816dde3049f822459d552ced4dcd4e3f9a16be82ee0747ed1479fe8339991176004b4ccc90380b7ef51292c7d9b518503a348d
+build/test/crn-to-all/unvanquished_64.tga	71014682514ec9d2baa19444fd026ceb65aa06e86d32f34b326f336e47cf4ea351aa7c2eee6a1f0fbf290658fae72c24a86c4e167272143012d384dd6d6b1ce9
+build/test/crn-to-all/unvanquished_64.bmp	a6d6886879f9aade027ecb4d55f2092c3af98c297aaf2f689d77a11870156099853a41993575a9a313a23e399b3bcb06dcc0eac46b877639f3875972af7933d7
+build/test/crn-to-all/unvanquished_64.png	dd9d45459bd5a3ed74d494838a3d61ed4baea9960300cb3f1d54ecc923f742c9036fe13a338da6db2efc98049a2e206cb7c0e1cba6d79ea0e3ad86473af13e83
+build/test/crn-to-all/unvanquished_64.crn	1596d312526073fd8923faefbed879fb1299ee53eeb54787f2b66754768d9a8160d9921b13aa9b7c781eb088be41cec0f3b703713aede43116a2b62f284f39f9
+build/test/crn-to-all/unvanquished_64.dds	2aae5c5bd8c6a82d1cf3fc9d9da12fe3fc5be8651261ff1cb359e754308fd81e93bf304aeb55ada0bad50794d6e97d3e48084e5a4f48fa7caec4ed954152bae9
+build/test/crn-to-all/unvanquished_64.ktx	10a45e43609c49b4929b91293e203557d8f5c1b146aa8162d946248e8fa24709e1645ed1fc40c2c1a541567b3d1287c7885cb0185230b660386825c4d03db22f
+build/test/crn-to-all/unvanquished_64.jpg	f68e74b3c8a404fc867345411c8778228728897e5d0870e071d6ec67fd1fccb45b3b97993575c3ed66d80cd6a7d60845e8fe68780ac322fe1d46adc57014fa8b
+build/test/dds-to-all/unvanquished_64.tga	46e0c1796f7b1a998829919e14f69cb43d83b895585aca69ad17e0f6cd9839d20b383a6eca161320b87bb7161cbedc116466ec27319078a011b59fe16dc6ce26
+build/test/dds-to-all/unvanquished_64.bmp	9d1b7c76f345332fa53e9b517ee47ba142d0c9def2b27b908af67b3c19edec0882f183f83eb9022cc2e726082193d7c82394a92b068137a4698a505d8bab0080
+build/test/dds-to-all/unvanquished_64.png	cd5b04f9c081f91a2d3a3fbf4484153feec5f0c027608f48a51209596ff604680ab93de70fbb616dc3fecea3fa6d240ac7a2e294bb0fc8244766375ffae54230
+build/test/dds-to-all/unvanquished_64.crn	0db1f3bcf6240389be389dc2a94fdabf97aab439d12aabc6cca2ccb69559759fc414d2bc7735d0d4812b895ffb4085172f6a48439a104d79e0b5d65124b1f002
+build/test/dds-to-all/unvanquished_64.dds	ce98b21c574b4883e4aff4a0b92fd0f533f22e00ab753686f353111fa7503287c2c4dba25f2c2670508630d79b59464578e094461bad81ad803e1d58ed5e69f8
+build/test/dds-to-all/unvanquished_64.ktx	dbbea021367254587000704d11b5cf7982d3ac4a42edd9489b7b2ec49da796d4346c68c6ee1a163e6880f0efaeafc0235b739c2a4acbd1ed27750657af36e3df
+build/test/dds-to-all/unvanquished_64.jpg	3a2bfcc1f2ecb18371163bb16812096b019fec176731f015a301384d605910702d168f8762076fa5d912760947c8df8d4026fd9b038c0d94360d1bf744f592a2
+build/test/ktx-to-all/unvanquished_64.tga	516bc1db1bfcda9c7f466cbb6f45b7608d9803391ae6d32e8de30d8e8102ef2de623cf6adfc74d471202ab14930dc4babe93a41b6c35b90e250a0de6b690fe7e
+build/test/ktx-to-all/unvanquished_64.bmp	0493fc75c26629d3a532e68e3778bb25ed6de4d81f3a39eb34a65a1990aa4072aa6b0948dc1ed3122b7ecf45e6be139d05b008ad7277649fc244d039404503fd
+build/test/ktx-to-all/unvanquished_64.png	7b5da6fea08f73d0e06791d000780820574d08e14c00c06ba2ef208296ebcfbc427175d72d6f2797e7240930782c70bf717a1e966fdd9aaada4a8b826ff9a2df
+build/test/ktx-to-all/unvanquished_64.crn	7cb43bf1f8fa87735d7643c3590b52bf918b6e202095787f2305c7469db957185871434b101fb2e2fb7d57e55fc0dc635994b8ed2765edb6b453f10931508f6b
+build/test/ktx-to-all/unvanquished_64.dds	b2cecbf2870835ec04a8ed69012d294402017fa565393f8266a6dcc868f9c5b472b8b568c98250b5beb5b0d43ee9d9dc06d04cca4f35073541ba8331d55a6b46
+build/test/ktx-to-all/unvanquished_64.ktx	d82eab591163d802231722ef325571735971b6a9b0703ed8ea59b4a4144189825d96d3455605426453fb3ad8d7cc61f931c52b3e73df2bb6787f7408baeb4ac7
+build/test/ktx-to-all/unvanquished_64.jpg	c350e1e0d90b8d519a0cfdbad85c972a6f6c077988b8e96f5daef415f816b3ace2bb87c79772c6d25954caeb598ef3af7700f0bc10914349161fe1a4cc1f2d73
+build/test/jpg-to-all/unvanquished_64.tga	4ea9e7b358a01fe1b09e9c16845a0249daddc87010403f33c525cfca69af85cb561019221adc8beae4172908d48a951df2d8bf65d63ae2ee183ee5c6df424c99
+build/test/jpg-to-all/unvanquished_64.bmp	20636873950cde44336751526644ea6e979b5bdf1f45a166a40b583977a6f6cce6db32ab9b14d66eba1777ab8447fbc926a91b095c27cb4487e04d1f36ed3b0b
+build/test/jpg-to-all/unvanquished_64.png	24124a42c01f243ec2864cc70d399b685183acb04216a0b21133b454f4d69d7606b3190119ff8c869c5dd4a28f77fbc352f3717747e32099f507cc7b790c39e2
+build/test/jpg-to-all/unvanquished_64.crn	f7bf97cafc570eb16335006623b887de1b05591035a20f9399edc2386c59ab43832d4741a3763210c022cb65ee7a0facb29138bb7daf0b71f6b9059c1852c445
+build/test/jpg-to-all/unvanquished_64.dds	c1b3b785d107ba2f18097fb1cf009f598dbda9e797741ed66bd6cf9b1c376447f0990bb3890af12e3c73c4e02410adc0b5be6f386867d8ffc6aded53adb5f309
+build/test/jpg-to-all/unvanquished_64.ktx	233e5d029b08cc45f8b3e9853edc6dc5dd5cab49cb0f95e870b9b6db917b2ddceaa2756d55aec1785c147375bc7a37030e3a8cde77d364f73d86043e99a7969a
+build/test/jpg-to-all/unvanquished_64.jpg	abe6f8c6820c4d0762a00b6ce0789834601d764b1a9a330eeb3b49d5209ee9ca2968e154d53e74912e05a4b99467df1710c12d62354cdfc8d49c9cd315de2b65
+build/test/tga-to-png/raw-bottom-left.png	6238f9678cd9fa774e6d50ee6638f316d0b1148ade344c06b4ddebac4738ea90e93c19d5cca405fccdabfdb37898bc7f9bccce1f0d974f9cbd18ab54b66adaa3
+build/test/tga-to-png/raw-bottom-right.png	6238f9678cd9fa774e6d50ee6638f316d0b1148ade344c06b4ddebac4738ea90e93c19d5cca405fccdabfdb37898bc7f9bccce1f0d974f9cbd18ab54b66adaa3
+build/test/tga-to-png/raw-top-left.png	6238f9678cd9fa774e6d50ee6638f316d0b1148ade344c06b4ddebac4738ea90e93c19d5cca405fccdabfdb37898bc7f9bccce1f0d974f9cbd18ab54b66adaa3
+build/test/tga-to-png/raw-top-right.png	6238f9678cd9fa774e6d50ee6638f316d0b1148ade344c06b4ddebac4738ea90e93c19d5cca405fccdabfdb37898bc7f9bccce1f0d974f9cbd18ab54b66adaa3
+build/test/tga-to-png/rle-bottom-left.png	6238f9678cd9fa774e6d50ee6638f316d0b1148ade344c06b4ddebac4738ea90e93c19d5cca405fccdabfdb37898bc7f9bccce1f0d974f9cbd18ab54b66adaa3
+build/test/tga-to-png/rle-bottom-right.png	6238f9678cd9fa774e6d50ee6638f316d0b1148ade344c06b4ddebac4738ea90e93c19d5cca405fccdabfdb37898bc7f9bccce1f0d974f9cbd18ab54b66adaa3
+build/test/tga-to-png/rle-top-left.png	6238f9678cd9fa774e6d50ee6638f316d0b1148ade344c06b4ddebac4738ea90e93c19d5cca405fccdabfdb37898bc7f9bccce1f0d974f9cbd18ab54b66adaa3
+build/test/tga-to-png/rle-top-right.png	6238f9678cd9fa774e6d50ee6638f316d0b1148ade344c06b4ddebac4738ea90e93c19d5cca405fccdabfdb37898bc7f9bccce1f0d974f9cbd18ab54b66adaa3
+build/test/tga-to-crn/raw-bottom-left.crn	fcf1da3fc69f6b05935deafacb1c637f44983b9992a7452f8f26a7787d5577c6548986366fae5fd6d300366de4acade853464e7656224b04673a7d129e006854
+build/test/tga-to-crn/raw-bottom-right.crn	fcf1da3fc69f6b05935deafacb1c637f44983b9992a7452f8f26a7787d5577c6548986366fae5fd6d300366de4acade853464e7656224b04673a7d129e006854
+build/test/tga-to-crn/raw-top-left.crn	fcf1da3fc69f6b05935deafacb1c637f44983b9992a7452f8f26a7787d5577c6548986366fae5fd6d300366de4acade853464e7656224b04673a7d129e006854
+build/test/tga-to-crn/raw-top-right.crn	fcf1da3fc69f6b05935deafacb1c637f44983b9992a7452f8f26a7787d5577c6548986366fae5fd6d300366de4acade853464e7656224b04673a7d129e006854
+build/test/tga-to-crn/rle-bottom-left.crn	fcf1da3fc69f6b05935deafacb1c637f44983b9992a7452f8f26a7787d5577c6548986366fae5fd6d300366de4acade853464e7656224b04673a7d129e006854
+build/test/tga-to-crn/rle-bottom-right.crn	fcf1da3fc69f6b05935deafacb1c637f44983b9992a7452f8f26a7787d5577c6548986366fae5fd6d300366de4acade853464e7656224b04673a7d129e006854
+build/test/tga-to-crn/rle-top-left.crn	fcf1da3fc69f6b05935deafacb1c637f44983b9992a7452f8f26a7787d5577c6548986366fae5fd6d300366de4acade853464e7656224b04673a7d129e006854
+build/test/tga-to-crn/rle-top-right.crn	fcf1da3fc69f6b05935deafacb1c637f44983b9992a7452f8f26a7787d5577c6548986366fae5fd6d300366de4acade853464e7656224b04673a7d129e006854
+build/test/png-to-png/test-colormap1-alpha1.png	f596534970da37597230ae60112a4fe4d08d950e03b99754a633d9d285f4683624b1f710727d6b3e556b80b9d44428bfa297dc898beaf6fecad29fe98bbc98cb
+build/test/png-to-png/test-colormap2-alpha1.png	2ffd5907e77157dfaac01c786b5150dcf822699254bebdd51ef1797568208ae924a572d90bc3ed3a06cc5e524c4c0d5a3de7aa75ae99febc4638533e41a6dda0
+build/test/png-to-png/test-colormap4-alpha1.png	f8cd5a9b1ae040baee41a7f378e18bba426f79532555e22fe2f8c605a8347d79e7b98bb8284130536512b187f9d8435d58665eddb8d36596296f84f05ee904ae
+build/test/png-to-png/test-colormap8-alpha1.png	3561be7b7958d37913708664413c149942f302907bf5f928782c7cf6cc4b312082f51fea6d8a3271b93bd37ace03ec22af65c224d6e7617ed8644fbe2f95dc35
+build/test/png-to-png/test-grayscale1-alpha1.png	57876e1d84ada2604c5e2dbbfd08c19286c87c8f1843cf47a9b77b4f6561c3b414a269f924c2be74bba4662503ede0fd9d94cb0a084c35a9f63a3cce07dcb876
+build/test/png-to-png/test-grayscale1-alpha8.png	62ba2ca3669febcb88959224732c295d891f10942dcddf2494c052886c4f502b0e30c1238d05196ce8113c2c150fa4d96fc81436af5ad6a28f7b8a64a77bbe7f
+build/test/png-to-png/test-grayscale8-alpha1.png	62ba2ca3669febcb88959224732c295d891f10942dcddf2494c052886c4f502b0e30c1238d05196ce8113c2c150fa4d96fc81436af5ad6a28f7b8a64a77bbe7f
+build/test/png-to-png/test-rgb8-alpha8.png	21630317b2ed9957241f4982c4e8207f7a00af23e0dd5df863965dbca9dcefd9a3c4f77b15ea91141c6c35181e44801ff1b5d0a7ed62f0c11eddfdaf7122b1a9
+build/test/png-to-crn/test-colormap1-alpha1.crn	f223d84528a0470cedeaf014c85f78ed16e1cc0f8990324fdbc087b190b6f972d1db6d829881c1414c5bd37b04c26794e7aa59b0d5b6eb535dae766a0c1d4ee9
+build/test/png-to-crn/test-colormap2-alpha1.crn	91b8372d3f16a0d198ac557b15cbafff4c3d456108dd4bee66902a20593a3ea2735ca2f052d3f6ca62cc31335e5a24f6f995116802ab46e3ded534168ba4fea3
+build/test/png-to-crn/test-colormap4-alpha1.crn	75c03a7c9181aa74a32040f9bea4e13317b342f1ce8c41e3a52ff8784f6cc28de08b4c002e089470873bbdd555d87a9c09c8a649c5ab4cda6614cf2f0cbf73e9
+build/test/png-to-crn/test-colormap8-alpha1.crn	b9ca0def9743aa4790d12de2faa9ce0bc355c916af8c0c4440e9a87a20c482feb563222b364a20ee7f70abff97e7d6312d679700b64704c2783d03b8cd9a757b
+build/test/png-to-crn/test-grayscale1-alpha1.crn	3a9175379f9512c74675a6d573bccdb0426d70e0ff9d63dacaa83e2c1f857dda14df93732a5776ef3625bdcf17d3ec51788623bb85e46c70a56bb306fd563b05
+build/test/png-to-crn/test-grayscale1-alpha8.crn	2660ab64afdb6eb70fdb131ef9927fc0b21bca021694bb4b8220451a9e0d5195306ef08d022ec7fb3b6535eed56efbe093e1108a116fdca81c5ce5a0c6e1da01
+build/test/png-to-crn/test-grayscale8-alpha1.crn	0e0dd5cf4f613eae1a5638060e6fbdcc1b8438e1c22ab27785a30efa8f0b20458e9b28b3da09b87d6bb9cab16f101908c64d74ab8247bef032de09449b380a77
+build/test/png-to-crn/test-rgb8-alpha8.crn	70aa2d510a77ef971cbc91c8eea5cc1c0d571722f3cd7eb5cf9e3b825987b87eb7653b0bfceee733f2a54d5fa9ce452df64ab441e64f327b78b492fd57c461a9
+build/test/bmp-to-crn/sample-default.crn	119f0f756811e56ba688c402ea317923d9665017aed19022ad19fc8396e45d3ca3bb7b5383f3edc00e859e31558a0865de88af71110529b16b89ded731070925
+build/test/bmp-to-crn/sample-vertical-flip.crn	119f0f756811e56ba688c402ea317923d9665017aed19022ad19fc8396e45d3ca3bb7b5383f3edc00e859e31558a0865de88af71110529b16b89ded731070925
+build/test/jpg-to-crn/black.crn	19fb840c8dbb7da96400af5af1c45fe48c7c7e19340d03fbe5a2af28ceecfb9efba26fe6c1bf46bd76164ecb0efe91cc9237917e8e431cd8365f80e9ffacc906
+build/test/example1-dds/unvanquished_64.dds	ce98b21c574b4883e4aff4a0b92fd0f533f22e00ab753686f353111fa7503287c2c4dba25f2c2670508630d79b59464578e094461bad81ad803e1d58ed5e69f8
+build/test/example1-crn/unvanquished_64.crn	a3b526e95f44b6a4c919bc8eb79f4debf592f0bccc163c900cd1b6f9add0ce58c3db9fc8dac1828d350bbcd915823d7743a0c114a533fbc08c163fcb4846d2f5
+build/test/example1-crn/unvanquished_64.dds	2aae5c5bd8c6a82d1cf3fc9d9da12fe3fc5be8651261ff1cb359e754308fd81e93bf304aeb55ada0bad50794d6e97d3e48084e5a4f48fa7caec4ed954152bae9
+build/test/example2-dds/unvanquished_64.dds	2aae5c5bd8c6a82d1cf3fc9d9da12fe3fc5be8651261ff1cb359e754308fd81e93bf304aeb55ada0bad50794d6e97d3e48084e5a4f48fa7caec4ed954152bae9
+build/test/example3-dds/unvanquished_64.dds	a719dd943bc4e30be0c124e6bafb1d8ba4002b9233e6208104f93046edd4ddd7aea7815430ae2c0b7efe259943f6a8fe109f56ea457e43cde79295ae7ac85b43
diff --git a/test/test.py b/test/test.py
index 6e1b51c3..b038cacb 100755
--- a/test/test.py
+++ b/test/test.py
@@ -1,154 +1,417 @@
 #! /usr/bin/env python3
 
+import hashlib
 import os
 import subprocess
 import sys
+from collections import OrderedDict
+
+try:
+    from colorama import Fore, Style
+except ModuleNotFoundError:
+    class Fore: CYAN = MAGENTA = GREEN = YELLOW = RED = ""
+    class Style: RESET_ALL = ""
 
 build_dir = os.getenv("CRUNCH_BUILD_DIR", "build")
 executable_extension = os.getenv("CRUNCH_EXE_EXTENSION", "")
 executable_runner = os.getenv("CRUNCH_EXE_RUNNER")
+simple_test = os.getenv("CRUNCH_SIMPLE_TEST")
+check_list = os.getenv("CRUNCH_CHECK_LIST", "files clones").split(" ")
+
+database_path = "test/checksums.tsv"
+
+file_knowledge = OrderedDict()
+clone_knowledge = OrderedDict()
+
+def print_status(message):
+    print("{}{}{}".format(Fore.CYAN, message, Style.RESET_ALL), file=sys.stderr)
+
+def print_notice(message):
+    print("{}{}{}".format(Fore.MAGENTA, message, Style.RESET_ALL), file=sys.stderr)
 
-def print_command(command_list):
-    print("running: " + " ".join(command_list), file=sys.stderr)
+def print_success(message):
+    print("{}{}{}".format(Fore.GREEN, message, Style.RESET_ALL), file=sys.stderr)
+
+def print_warning(message):
+    print("{}Warning: {}{}".format(Fore.YELLOW, message, Style.RESET_ALL), file=sys.stderr)
+
+def print_error(message):
+    print("{}Error: {}{}".format(Fore.RED, message, Style.RESET_ALL), file=sys.stderr)
+    exit(1)
+
+def print_command_run(command_list):
+    print_status("Running command: {}".format(" ".join(command_list)))
+
+def print_command_success(command_list):
+    print_success("Command succeeded: {}".format(" ".join(command_list)))
 
 def convert_path(path):
     if path.startswith("build/"):
         path = build_dir + path[len("build"):]
+
     return path.replace("/", os.path.sep)
 
+def get_file_sum(file_path):
+    return hashlib.blake2b(open(file_path, "rb").read()).hexdigest()
+
 def run(command_list):
     if executable_runner:
         command_list = executable_runner.split(" ") + command_list
-    print_command(command_list)
+
+    print_command_run(command_list)
     returncode = subprocess.run(command_list).returncode
+
     if returncode:
+        print_error("Command failed: {}".format(" ".join(command_list)))
         exit(returncode)
 
+    print_command_success(command_list)
+
 def mkdir(path):
     path = convert_path(path)
-    print_command(["mkdir", path])
+    command_list = ["mkdir", path]
+    print_command_run(command_list)
     os.makedirs(path, exist_ok=True)
+    print_command_success(command_list)
 
 def get_build_dir():
     windows_build_dir = os.path.join(build_dir, "Release")
+
     if os.path.exists(windows_build_dir):
         return windows_build_dir
+
     return build_dir
 
 def get_executable_path(executable_name):
     executable_name += executable_extension
     build_dir = get_build_dir()
+
     return os.path.join(build_dir, executable_name)
 
-def crunch(input_path, output_path, options=[]):
+def add_clone(clone, file_path):
+    if not clone:
+        return
+
+    if clone not in clone_knowledge.keys():
+        clone_knowledge[clone] = {}
+        clone_knowledge[clone]["files"] = OrderedDict()
+
+
+    clone_knowledge[clone]["files"][file_path] = False
+
+def crunch(input_path, output_path, clone=None, options=[]):
     executable_path = get_executable_path("crunch")
     command_list = [executable_path] + options
 
     if input_path:
-        input_path = convert_path(input_path)
-        output_path = convert_path(output_path)
-        command_list += ["-noTitle", "-file", input_path, "-out", output_path]
+        converted_input_path = convert_path(input_path)
+        command_list += ["-noTitle", "-helperThreads", "3", "-nostats", "-noprogress", "-file", converted_input_path]
+
+    if output_path:
+        converted_output_path = convert_path(output_path)
+        command_list += ["-out", converted_output_path]
+        file_knowledge[output_path] = {"converted_path": converted_output_path}
+        add_clone(clone, output_path)
 
     run(command_list)
 
-def example(num, input_path, output_path, options=[]):
+def example(num, input_path, output_path, clone=None, options=[]):
     executable_path = get_executable_path("example" + str(num))
-    command_list = [executable_path] 
+    command_list = [executable_path]
 
     if (num == 1):
         command_list += [options[0]]
         options = options[1:]
 
     if input_path:
-        input_path = convert_path(input_path)
-        command_list += [input_path]
+        converted_input_path = convert_path(input_path)
+        command_list += [converted_input_path]
 
     command_list += options
 
     if output_path:
-        output_path = convert_path(output_path)
-        command_list += ["-out", output_path]
+        converted_output_path = convert_path(output_path)
+        command_list += ["-out", converted_output_path]
+        file_knowledge[output_path] = {"converted_path": converted_output_path}
+        add_clone(clone, output_path)
 
     run(command_list)
 
-crunch(None, None, ["--help"])
+def sum_files():
+    for file_path in file_knowledge.keys():
+        print_status("Summing file {}".format(file_path))
+        file_sum = get_file_sum(file_knowledge[file_path]["converted_path"])
+        file_knowledge[file_path]["file_sum"] = file_sum
+        print_notice("File {} has checksum {}".format(file_path, file_sum))
+
+def record_sums():
+    database_content = ""
+
+    for file_path in file_knowledge.keys():
+        database_content += "{}\t{}\n".format(file_path, file_knowledge[file_path]["file_sum"])
+
+    database_file = open(database_path, "w")
+    database_file.write(database_content)
+    database_file.close()
+
+    print_success("All test results recorded")
+
+def verify_clones(verification):
+    all_verified = True
+
+    if verification:
+        for file_clone in clone_knowledge.keys():
+            for file_path in clone_knowledge[file_clone]["files"].keys():
+                file_sum = file_knowledge[file_path]["file_sum"]
+
+                if "known_sum" in clone_knowledge[file_clone].keys():
+                    known_sum = clone_knowledge[file_clone]["known_sum"]
+                    verified = file_sum == known_sum
+                    clone_knowledge[file_clone]["files"][file_path] = verified
+
+                    if verified:
+                        print_success("Clone {}'s checksum {} matches known one".format(file_path, known_sum))
+                    else:
+                        print_warning("Clone {}'s checksum {} doesn't match known one {}".format(file_path, file_sum, known_sum))
+                        all_verified = False
+
+                else:
+                    clone_knowledge[file_clone]["known_sum"] = file_sum
+
+    return all_verified
+
+def verify_files(verification):
+    all_verified = True
+
+    if verification:
+        database_file = open(database_path, "r")
+
+        for line in database_file.readlines():
+            file_path, known_sum = line.split("\t")
+            file_knowledge[file_path]["known_sum"] = known_sum.split("\n")[0]
+
+        database_file.close()
+
+        for file_path in file_knowledge.keys():
+            print_status("Checking file {}".format(file_path))
+            file_sum = file_knowledge[file_path]["file_sum"]
+            known_sum = file_knowledge[file_path]["known_sum"]
+            verified = file_sum == known_sum
+            file_knowledge[file_path]["verified"] = verified
 
-if "CRUNCH_SIMPLE_TEST" in os.environ.keys():
+            if verified:
+                print_success("File {}'s checksum {} matches known one".format(file_path, known_sum))
+            else:
+                print_warning("File {}'s checksum {} doesn't match known one {}".format(file_path, file_sum, known_sum))
+                all_verified = False
+
+    return all_verified
+
+def print_clones_results(verification):
+    if verification:
+        print("Clones verification results:")
+    else:
+        print("Clones generation results:")
+
+    for file_clone in clone_knowledge.keys():
+        first = True
+        for file_path in clone_knowledge[file_clone]["files"].keys():
+            if first:
+                verified_string = "---"
+                first = False
+            elif verification:
+                verified = clone_knowledge[file_clone]["files"][file_path]
+                verified_string = ["No", "Yes"][verified]
+            else:
+                verified_string = "???"
+
+            short_sum = file_knowledge[file_path]["file_sum"][0:10]
+            print("{:<3} {} {} {}".format(verified_string, short_sum, file_clone, file_path))
+
+def print_files_results(verification):
+    if verification:
+        print("Files verification results:")
+    else:
+        print("Files generation results:")
+
+    for file_path in file_knowledge.keys():
+        if verification:
+            verified = file_knowledge[file_path]["verified"]
+            verified_string = ["No", "Yes"][verified]
+        else:
+            verified_string = "???"
+
+        short_sum = file_knowledge[file_path]["file_sum"][0:10]
+        print("{:<3} {} {}".format(verified_string, short_sum, file_path))
+
+def print_end_results(clones_verification, clones_verified, files_verification, files_verified):
+    if clones_verification:
+        if clones_verified:
+            print_success("All clones verified")
+        else:
+            print_warning("Some clones were not verified")
+
+    if files_verification:
+        if files_verified:
+            print_success("All files verified")
+        else:
+            print_warning("Some files were not verified")
+
+    if clones_verified and files_verified:
+       print_success("All tests passed")
+    else:
+       print_error("Some tests failed")
+
+crunch(None, None, options=["--help"])
+
+if simple_test == "true":
     exit(0)
 
-mkdir("build/test/0")
-crunch("test/unvanquished_64.png", "build/test/0/unvanquished_64.crn")
-crunch("test/unvanquished_64.png", "build/test/0/unvanquished_64.dds")
-crunch("test/unvanquished_64.png", "build/test/0/unvanquished_64.ktx")
-crunch("test/unvanquished_64.png", "build/test/0/unvanquished_64.tga")
-crunch("test/unvanquished_64.png", "build/test/0/unvanquished_64.bmp")
-crunch("test/unvanquished_64.png", "build/test/0/unvanquished_64.png")
-crunch("test/unvanquished_64.png", "build/test/0/unvanquished_64.jpg")
-
-mkdir("build/test/1")
-crunch("build/test/0/unvanquished_64.crn", "build/test/1/unvanquished_64.crn")
-crunch("build/test/0/unvanquished_64.crn", "build/test/1/unvanquished_64.dds")
-crunch("build/test/0/unvanquished_64.crn", "build/test/1/unvanquished_64.ktx")
-crunch("build/test/0/unvanquished_64.crn", "build/test/1/unvanquished_64.tga")
-crunch("build/test/0/unvanquished_64.crn", "build/test/1/unvanquished_64.bmp")
-crunch("build/test/0/unvanquished_64.crn", "build/test/1/unvanquished_64.png")
-crunch("build/test/0/unvanquished_64.crn", "build/test/1/unvanquished_64.jpg")
-
-mkdir("build/test/2")
-crunch("build/test/0/unvanquished_64.dds", "build/test/2/unvanquished_64.crn")
-crunch("build/test/0/unvanquished_64.dds", "build/test/2/unvanquished_64.dds")
-crunch("build/test/0/unvanquished_64.dds", "build/test/2/unvanquished_64.ktx")
-crunch("build/test/0/unvanquished_64.dds", "build/test/2/unvanquished_64.tga")
-crunch("build/test/0/unvanquished_64.dds", "build/test/2/unvanquished_64.bmp")
-crunch("build/test/0/unvanquished_64.dds", "build/test/2/unvanquished_64.png")
-crunch("build/test/0/unvanquished_64.dds", "build/test/2/unvanquished_64.jpg")
-
-mkdir("build/test/3")
-crunch("build/test/0/unvanquished_64.ktx", "build/test/3/unvanquished_64.crn")
-crunch("build/test/0/unvanquished_64.ktx", "build/test/3/unvanquished_64.dds")
-crunch("build/test/0/unvanquished_64.ktx", "build/test/3/unvanquished_64.ktx")
-crunch("build/test/0/unvanquished_64.ktx", "build/test/3/unvanquished_64.tga")
-crunch("build/test/0/unvanquished_64.ktx", "build/test/3/unvanquished_64.bmp")
-crunch("build/test/0/unvanquished_64.ktx", "build/test/3/unvanquished_64.png")
-crunch("build/test/0/unvanquished_64.ktx", "build/test/3/unvanquished_64.jpg")
-
-mkdir("build/test/4")
-crunch("test/raw-bottom-left.tga", "build/test/4/raw-bottom-left.crn")
-crunch("test/raw-bottom-right.tga", "build/test/4/raw-bottom-right.crn")
-crunch("test/raw-top-left.tga", "build/test/4/raw-top-left.crn")
-crunch("test/raw-top-right.tga", "build/test/4/raw-top-right.crn")
-crunch("test/rle-bottom-left.tga", "build/test/4/rle-bottom-left.crn")
-crunch("test/rle-bottom-right.tga", "build/test/4/rle-bottom-right.crn")
-crunch("test/rle-top-left.tga", "build/test/4/rle-top-left.crn")
-crunch("test/rle-top-right.tga", "build/test/4/rle-top-right.crn")
-
-mkdir("build/test/5")
-crunch("test/test-colormap1-alpha1.png", "build/test/5/test-colormap1-alpha1.crn")
-crunch("test/test-colormap2-alpha1.png", "build/test/5/test-colormap2-alpha1.crn")
-crunch("test/test-colormap4-alpha1.png", "build/test/5/test-colormap4-alpha1.crn")
-crunch("test/test-colormap8-alpha1.png", "build/test/5/test-colormap8-alpha1.crn")
-crunch("test/test-grayscale1-alpha1.png", "build/test/5/test-grayscale1-alpha1.crn")
-crunch("test/test-grayscale1-alpha8.png", "build/test/5/test-grayscale1-alpha8.crn")
-crunch("test/test-grayscale8-alpha1.png", "build/test/5/test-grayscale8-alpha1.crn")
-crunch("test/test-rgb8-alpha8.png", "build/test/5/test-rgb8-alpha8.crn")
-
-mkdir("build/test/6")
-crunch("test/sample-default.bmp", "build/test/6/sample-default.crn")
-crunch("test/sample-vertical-flip.bmp", "build/test/6/sample-vertical-flip.crn")
-
-mkdir("build/test/7")
-crunch("test/black.jpg", "build/test/7/black.crn")
-
-mkdir("build/test/8")
-example(1, "test/unvanquished_64.png", None, ["i"])
-example(1, "test/unvanquished_64.png", "build/test/8/unvanquished_64.dds", ["c"])
-
-mkdir("build/test/9")
-example(1, "test/unvanquished_64.png", "build/test/9/unvanquished_64.crn", ["c", "-crn"])
-example(1, "build/test/9/unvanquished_64.crn", "build/test/9/unvanquished_64.dds", ["d"])
-
-mkdir("build/test/10")
-example(2, "build/test/9/unvanquished_64.crn", "build/test/10/unvanquished_64.dds")
-
-mkdir("build/test/11")
-example(3, "test/unvanquished_64.png", "build/test/11/unvanquished_64.dds")
+mkdir("build/test/png-to-all")
+crunch("test/unvanquished_64.png", "build/test/png-to-all/unvanquished_64.tga", clone="tga")
+crunch("test/unvanquished_64.png", "build/test/png-to-all/unvanquished_64.bmp", clone="bmp")
+crunch("test/unvanquished_64.png", "build/test/png-to-all/unvanquished_64.png", clone="png")
+crunch("test/unvanquished_64.png", "build/test/png-to-all/unvanquished_64.crn", clone="crn")
+crunch("test/unvanquished_64.png", "build/test/png-to-all/unvanquished_64.dds", clone="dds")
+crunch("test/unvanquished_64.png", "build/test/png-to-all/unvanquished_64.ktx", clone="ktx")
+crunch("test/unvanquished_64.png", "build/test/png-to-all/unvanquished_64.jpg", clone="jpg")
+
+mkdir("build/test/tga-to-all")
+crunch("build/test/png-to-all/unvanquished_64.tga", "build/test/tga-to-all/unvanquished_64.tga", clone="tga")
+crunch("build/test/png-to-all/unvanquished_64.tga", "build/test/tga-to-all/unvanquished_64.bmp", clone="bmp")
+crunch("build/test/png-to-all/unvanquished_64.tga", "build/test/tga-to-all/unvanquished_64.png", clone="png")
+crunch("build/test/png-to-all/unvanquished_64.tga", "build/test/tga-to-all/unvanquished_64.crn", clone="crn")
+crunch("build/test/png-to-all/unvanquished_64.tga", "build/test/tga-to-all/unvanquished_64.dds", clone="dds")
+crunch("build/test/png-to-all/unvanquished_64.tga", "build/test/tga-to-all/unvanquished_64.ktx", clone="ktx")
+crunch("build/test/png-to-all/unvanquished_64.tga", "build/test/tga-to-all/unvanquished_64.jpg", clone="jpg")
+
+mkdir("build/test/bmp-to-all")
+crunch("build/test/png-to-all/unvanquished_64.bmp", "build/test/bmp-to-all/unvanquished_64.tga", clone="tga")
+crunch("build/test/png-to-all/unvanquished_64.bmp", "build/test/bmp-to-all/unvanquished_64.bmp", clone="bmp")
+crunch("build/test/png-to-all/unvanquished_64.bmp", "build/test/bmp-to-all/unvanquished_64.png", clone="png")
+crunch("build/test/png-to-all/unvanquished_64.bmp", "build/test/bmp-to-all/unvanquished_64.crn", clone="crn")
+crunch("build/test/png-to-all/unvanquished_64.bmp", "build/test/bmp-to-all/unvanquished_64.dds", clone="dds")
+crunch("build/test/png-to-all/unvanquished_64.bmp", "build/test/bmp-to-all/unvanquished_64.ktx", clone="ktx")
+crunch("build/test/png-to-all/unvanquished_64.bmp", "build/test/bmp-to-all/unvanquished_64.jpg", clone="jpg")
+
+mkdir("build/test/crn-to-all")
+crunch("build/test/png-to-all/unvanquished_64.crn", "build/test/crn-to-all/unvanquished_64.tga")
+crunch("build/test/png-to-all/unvanquished_64.crn", "build/test/crn-to-all/unvanquished_64.bmp")
+crunch("build/test/png-to-all/unvanquished_64.crn", "build/test/crn-to-all/unvanquished_64.png")
+crunch("build/test/png-to-all/unvanquished_64.crn", "build/test/crn-to-all/unvanquished_64.crn")
+crunch("build/test/png-to-all/unvanquished_64.crn", "build/test/crn-to-all/unvanquished_64.dds", clone="crn_dds")
+crunch("build/test/png-to-all/unvanquished_64.crn", "build/test/crn-to-all/unvanquished_64.ktx")
+crunch("build/test/png-to-all/unvanquished_64.crn", "build/test/crn-to-all/unvanquished_64.jpg")
+
+mkdir("build/test/dds-to-all")
+crunch("build/test/png-to-all/unvanquished_64.dds", "build/test/dds-to-all/unvanquished_64.tga")
+crunch("build/test/png-to-all/unvanquished_64.dds", "build/test/dds-to-all/unvanquished_64.bmp")
+crunch("build/test/png-to-all/unvanquished_64.dds", "build/test/dds-to-all/unvanquished_64.png")
+crunch("build/test/png-to-all/unvanquished_64.dds", "build/test/dds-to-all/unvanquished_64.crn")
+crunch("build/test/png-to-all/unvanquished_64.dds", "build/test/dds-to-all/unvanquished_64.dds", clone="dds")
+crunch("build/test/png-to-all/unvanquished_64.dds", "build/test/dds-to-all/unvanquished_64.ktx")
+crunch("build/test/png-to-all/unvanquished_64.dds", "build/test/dds-to-all/unvanquished_64.jpg")
+
+mkdir("build/test/ktx-to-all")
+crunch("build/test/png-to-all/unvanquished_64.ktx", "build/test/ktx-to-all/unvanquished_64.tga")
+crunch("build/test/png-to-all/unvanquished_64.ktx", "build/test/ktx-to-all/unvanquished_64.bmp")
+crunch("build/test/png-to-all/unvanquished_64.ktx", "build/test/ktx-to-all/unvanquished_64.png")
+crunch("build/test/png-to-all/unvanquished_64.ktx", "build/test/ktx-to-all/unvanquished_64.crn")
+crunch("build/test/png-to-all/unvanquished_64.ktx", "build/test/ktx-to-all/unvanquished_64.dds")
+crunch("build/test/png-to-all/unvanquished_64.ktx", "build/test/ktx-to-all/unvanquished_64.ktx")
+crunch("build/test/png-to-all/unvanquished_64.ktx", "build/test/ktx-to-all/unvanquished_64.jpg")
+
+mkdir("build/test/jpg-to-all")
+crunch("build/test/png-to-all/unvanquished_64.jpg", "build/test/jpg-to-all/unvanquished_64.tga")
+crunch("build/test/png-to-all/unvanquished_64.jpg", "build/test/jpg-to-all/unvanquished_64.bmp")
+crunch("build/test/png-to-all/unvanquished_64.jpg", "build/test/jpg-to-all/unvanquished_64.png")
+crunch("build/test/png-to-all/unvanquished_64.jpg", "build/test/jpg-to-all/unvanquished_64.crn")
+crunch("build/test/png-to-all/unvanquished_64.jpg", "build/test/jpg-to-all/unvanquished_64.dds")
+crunch("build/test/png-to-all/unvanquished_64.jpg", "build/test/jpg-to-all/unvanquished_64.ktx")
+crunch("build/test/png-to-all/unvanquished_64.jpg", "build/test/jpg-to-all/unvanquished_64.jpg")
+
+mkdir("build/test/tga-to-png")
+crunch("test/raw-bottom-left.tga", "build/test/tga-to-png/raw-bottom-left.png", clone="tga_png")
+crunch("test/raw-bottom-right.tga", "build/test/tga-to-png/raw-bottom-right.png", clone="tga_png")
+crunch("test/raw-top-left.tga", "build/test/tga-to-png/raw-top-left.png", clone="tga_png")
+crunch("test/raw-top-right.tga", "build/test/tga-to-png/raw-top-right.png", clone="tga_png")
+crunch("test/rle-bottom-left.tga", "build/test/tga-to-png/rle-bottom-left.png", clone="tga_png")
+crunch("test/rle-bottom-right.tga", "build/test/tga-to-png/rle-bottom-right.png", clone="tga_png")
+crunch("test/rle-top-left.tga", "build/test/tga-to-png/rle-top-left.png", clone="tga_png")
+crunch("test/rle-top-right.tga", "build/test/tga-to-png/rle-top-right.png", clone="tga_png")
+
+mkdir("build/test/tga-to-crn")
+crunch("test/raw-bottom-left.tga", "build/test/tga-to-crn/raw-bottom-left.crn", clone="tga_crn")
+crunch("test/raw-bottom-right.tga", "build/test/tga-to-crn/raw-bottom-right.crn", clone="tga_crn")
+crunch("test/raw-top-left.tga", "build/test/tga-to-crn/raw-top-left.crn", clone="tga_crn")
+crunch("test/raw-top-right.tga", "build/test/tga-to-crn/raw-top-right.crn", clone="tga_crn")
+crunch("test/rle-bottom-left.tga", "build/test/tga-to-crn/rle-bottom-left.crn", clone="tga_crn")
+crunch("test/rle-bottom-right.tga", "build/test/tga-to-crn/rle-bottom-right.crn", clone="tga_crn")
+crunch("test/rle-top-left.tga", "build/test/tga-to-crn/rle-top-left.crn", clone="tga_crn")
+crunch("test/rle-top-right.tga", "build/test/tga-to-crn/rle-top-right.crn", clone="tga_crn")
+
+mkdir("build/test/png-to-png")
+crunch("test/test-colormap1-alpha1.png", "build/test/png-to-png/test-colormap1-alpha1.png")
+crunch("test/test-colormap2-alpha1.png", "build/test/png-to-png/test-colormap2-alpha1.png")
+crunch("test/test-colormap4-alpha1.png", "build/test/png-to-png/test-colormap4-alpha1.png")
+crunch("test/test-colormap8-alpha1.png", "build/test/png-to-png/test-colormap8-alpha1.png")
+crunch("test/test-grayscale1-alpha1.png", "build/test/png-to-png/test-grayscale1-alpha1.png")
+crunch("test/test-grayscale1-alpha8.png", "build/test/png-to-png/test-grayscale1-alpha8.png")
+crunch("test/test-grayscale8-alpha1.png", "build/test/png-to-png/test-grayscale8-alpha1.png")
+crunch("test/test-rgb8-alpha8.png", "build/test/png-to-png/test-rgb8-alpha8.png")
+
+mkdir("build/test/png-to-crn")
+crunch("test/test-colormap1-alpha1.png", "build/test/png-to-crn/test-colormap1-alpha1.crn")
+crunch("test/test-colormap2-alpha1.png", "build/test/png-to-crn/test-colormap2-alpha1.crn")
+crunch("test/test-colormap4-alpha1.png", "build/test/png-to-crn/test-colormap4-alpha1.crn")
+crunch("test/test-colormap8-alpha1.png", "build/test/png-to-crn/test-colormap8-alpha1.crn")
+crunch("test/test-grayscale1-alpha1.png", "build/test/png-to-crn/test-grayscale1-alpha1.crn")
+crunch("test/test-grayscale1-alpha8.png", "build/test/png-to-crn/test-grayscale1-alpha8.crn")
+crunch("test/test-grayscale8-alpha1.png", "build/test/png-to-crn/test-grayscale8-alpha1.crn")
+crunch("test/test-rgb8-alpha8.png", "build/test/png-to-crn/test-rgb8-alpha8.crn")
+
+mkdir("build/test/bmp-to-crn")
+crunch("test/sample-default.bmp", "build/test/bmp-to-crn/sample-default.crn", "bmp_crn")
+crunch("test/sample-vertical-flip.bmp", "build/test/bmp-to-crn/sample-vertical-flip.crn", "bmp_crn")
+
+mkdir("build/test/jpg-to-crn")
+crunch("test/black.jpg", "build/test/jpg-to-crn/black.crn")
+
+mkdir("build/test/example1-dds")
+example(1, "test/unvanquished_64.png", None, options=["i"])
+example(1, "test/unvanquished_64.png", "build/test/example1-dds/unvanquished_64.dds", clone="dds", options=["c"])
+
+mkdir("build/test/example1-crn")
+example(1, "test/unvanquished_64.png", "build/test/example1-crn/unvanquished_64.crn", clone="crn", options=["c", "-crn"])
+example(1, "build/test/example1-crn/unvanquished_64.crn", "build/test/example1-crn/unvanquished_64.dds", clone="crn_dds", options=["d"])
+
+mkdir("build/test/example2-dds")
+example(2, "build/test/example1-crn/unvanquished_64.crn", "build/test/example2-dds/unvanquished_64.dds", clone="crn_dds")
+
+mkdir("build/test/example3-dds")
+example(3, "test/unvanquished_64.png", "build/test/example3-dds/unvanquished_64.dds")
+
+print_success("All tests executed")
+
+sum_files()
+
+all_verified = True
+clones_verification = "clones" in check_list
+files_verification = "files" in check_list
+
+recording = sys.argv[1:] == ["--record"]
+
+if recording:
+    clones_verification = False
+    files_verification = False
+    record_sums()
+
+clones_verified = verify_clones(clones_verification)
+
+files_verified = verify_files(files_verification)
+
+print_clones_results(clones_verification)
+
+print_files_results(files_verification)
+
+print_end_results(clones_verification, clones_verified, files_verification, files_verified)