diff --git a/components/bsa/tests/.gitignore b/components/bsa/tests/.gitignore deleted file mode 100644 index e2f2f332d..000000000 --- a/components/bsa/tests/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*_test -bsatool -*.bsa diff --git a/components/bsa/tests/Makefile b/components/bsa/tests/Makefile deleted file mode 100644 index 73e20d7b3..000000000 --- a/components/bsa/tests/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -GCC=g++ - -all: bsa_file_test ogre_archive_test - -I_OGRE=$(shell pkg-config --cflags OGRE) -L_OGRE=$(shell pkg-config --libs OGRE) - -bsa_file_test: bsa_file_test.cpp ../bsa_file.cpp - $(GCC) $^ -o $@ - -ogre_archive_test: ogre_archive_test.cpp ../bsa_file.cpp ../bsa_archive.cpp - $(GCC) $^ -o $@ $(I_OGRE) $(L_OGRE) - -clean: - rm *_test diff --git a/components/bsa/tests/bsa_file_test.cpp b/components/bsa/tests/bsa_file_test.cpp deleted file mode 100644 index 07ee73d17..000000000 --- a/components/bsa/tests/bsa_file_test.cpp +++ /dev/null @@ -1,44 +0,0 @@ -#include "../bsa_file.hpp" - -/* - Test of the BSAFile class - - This test requires that data/Morrowind.bsa exists in the root - directory of OpenMW. - - */ - -#include - -using namespace std; -using namespace Bsa; - -BSAFile bsa; - -void find(const char* file) -{ - cout << "Does file '" << file << "' exist?\n "; - if(bsa.exists(file)) - { - cout << "Yes.\n "; - cout << bsa.getFile(file)->size() << " bytes\n"; - } - else cout << "No.\n"; -} - -int main() -{ - cout << "Reading Morrowind.bsa\n"; - bsa.open("../../data/Morrowind.bsa"); - - const BSAFile::FileList &files = bsa.getList(); - - cout << "First 10 files in archive:\n"; - for(int i=0; i<10; i++) - cout << " " << files[i].name - << " (" << files[i].fileSize << " bytes @" - << files[i].offset << ")\n"; - - find("meshes\\r\\xnetch_betty.nif"); - find("humdrum"); -} diff --git a/components/bsa/tests/ogre_archive_test.cpp b/components/bsa/tests/ogre_archive_test.cpp deleted file mode 100644 index 9cd57240f..000000000 --- a/components/bsa/tests/ogre_archive_test.cpp +++ /dev/null @@ -1,34 +0,0 @@ -#include -#include - -// This is a test of the BSA archive handler for OGRE. - -#include "../bsa_archive.hpp" - -using namespace Ogre; -using namespace std; - -int main() -{ - // Disable Ogre logging - new LogManager; - Log *log = LogManager::getSingleton().createLog(""); - log->setDebugOutputEnabled(false); - - // Set up Root - Root *root = new Root("","",""); - - // Add the BSA - Bsa::addBSA("../../data/Morrowind.bsa"); - - // Pick a sample file - String tex = "textures\\tx_natural_cavern_wall13.dds"; - cout << "Opening file: " << tex << endl; - - // Get it from the resource system - DataStreamPtr data = ResourceGroupManager::getSingleton().openResource(tex, "General"); - - cout << "Size: " << data->size() << endl; - - return 0; -} diff --git a/components/bsa/tests/output/bsa_file_test.out b/components/bsa/tests/output/bsa_file_test.out deleted file mode 100644 index 0d8e76cdd..000000000 --- a/components/bsa/tests/output/bsa_file_test.out +++ /dev/null @@ -1,17 +0,0 @@ -Reading Morrowind.bsa -First 10 files in archive: - meshes\m\probe_journeyman_01.nif (6276 bytes @126646052) - textures\menu_rightbuttonup_top.dds (256 bytes @218530052) - textures\menu_rightbuttonup_right.dds (256 bytes @218529796) - textures\menu_rightbuttonup_left.dds (256 bytes @218529540) - textures\menu_rightbuttondown_top.dds (256 bytes @218528196) - meshes\b\b_n_redguard_f_skins.nif (41766 bytes @17809778) - meshes\b\b_n_redguard_m_skins.nif (41950 bytes @18103107) - meshes\b\b_n_redguard_f_wrist.nif (2355 bytes @17858132) - meshes\b\b_n_redguard_m_foot.nif (4141 bytes @17862081) - meshes\b\b_n_redguard_m_knee.nif (2085 bytes @18098101) -Does file 'meshes\r\xnetch_betty.nif' exist? - Yes. - 53714 bytes -Does file 'humdrum' exist? - No. diff --git a/components/bsa/tests/output/ogre_archive_test.out b/components/bsa/tests/output/ogre_archive_test.out deleted file mode 100644 index 748e4b1e7..000000000 --- a/components/bsa/tests/output/ogre_archive_test.out +++ /dev/null @@ -1,2 +0,0 @@ -Opening file: textures\tx_natural_cavern_wall13.dds -Size: 43808 diff --git a/components/bsa/tests/test.sh b/components/bsa/tests/test.sh deleted file mode 100755 index 2d07708ad..000000000 --- a/components/bsa/tests/test.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -make || exit - -mkdir -p output - -PROGS=*_test - -for a in $PROGS; do - if [ -f "output/$a.out" ]; then - echo "Running $a:" - ./$a | diff output/$a.out - - else - echo "Creating $a.out" - ./$a > "output/$a.out" - git add "output/$a.out" - fi -done