diff --git a/sound/tests/output/audiere_source_test.out b/sound/tests/output/audiere_source_test.out new file mode 100644 index 000000000..47a5a9e41 --- /dev/null +++ b/sound/tests/output/audiere_source_test.out @@ -0,0 +1,21 @@ +Reading cow.raw first +Size: 37502 +Done + +Loading cow.wav by filename: +Source size: 37502 +rate=11025 +channels=1 +bits=16 +Reading entire buffer into memory +Comparing... +Done + +Loading cow.wav by stream: +Source size: 37502 +rate=11025 +channels=1 +bits=16 +Reading entire buffer into memory +Comparing... +Done diff --git a/sound/tests/output/ffmpeg_source_test.out b/sound/tests/output/ffmpeg_source_test.out new file mode 100644 index 000000000..1c7d49113 --- /dev/null +++ b/sound/tests/output/ffmpeg_source_test.out @@ -0,0 +1,12 @@ +Reading cow.raw first +Size: 37502 +Done + +Loading cow.wav by filename: +rate=11025 +channels=1 +bits=16 +Reading entire buffer into memory +Actually read: 37502 +Comparing... +Done diff --git a/sound/tests/output/openal_audiere_test.out b/sound/tests/output/openal_audiere_test.out new file mode 100644 index 000000000..4fe01eac2 --- /dev/null +++ b/sound/tests/output/openal_audiere_test.out @@ -0,0 +1,3 @@ +Playing cow.wav +Playing owl.ogg +Playing cow.wav (from stream) diff --git a/sound/tests/output/openal_output_test.out b/sound/tests/output/openal_output_test.out new file mode 100644 index 000000000..04392a72e --- /dev/null +++ b/sound/tests/output/openal_output_test.out @@ -0,0 +1,5 @@ +Loading cow.raw + rate=11025 + channels=1 + bits=16 +Playing diff --git a/sound/tests/test.sh b/sound/tests/test.sh new file mode 100755 index 000000000..b1ca6f1a6 --- /dev/null +++ b/sound/tests/test.sh @@ -0,0 +1,18 @@ +#!/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 diff --git a/stream/tests/output/audiere_client_test.out b/stream/tests/output/audiere_client_test.out new file mode 100644 index 000000000..2130db9fd --- /dev/null +++ b/stream/tests/output/audiere_client_test.out @@ -0,0 +1,9 @@ +pos=0 +2 bytes: he +pos=2 +pos=4 +3 bytes: o w +pos=6 +pos=7 +last 4 bytes: orld +entire stream: hello world diff --git a/stream/tests/output/buffer_filter_test.out b/stream/tests/output/buffer_filter_test.out new file mode 100644 index 000000000..0ca252f25 --- /dev/null +++ b/stream/tests/output/buffer_filter_test.out @@ -0,0 +1,22 @@ +Size: 11 +Pos: 0 +Seeking... +Pos: 3 +Reading: 4 +Four bytes: lo w +Eof: 0 +Pos: 7 +Seeking again... +Pos: 11 +Eof: 1 +Seek to 6 +Eof: 0 +Pos: 6 +Over-reading: 5 +Result: world +Eof: 1 +Pos: 11 +Finally, reading the entire string: 11 +Result: hello world +Eof: 1 +Pos: 11 diff --git a/stream/tests/output/file_server_test.out b/stream/tests/output/file_server_test.out new file mode 100644 index 000000000..240f066a3 --- /dev/null +++ b/stream/tests/output/file_server_test.out @@ -0,0 +1,3 @@ +pos=0 eof=0 +First 20 bytes: #include "../servers +pos=20 eof=0 diff --git a/stream/tests/output/memory_server_test.out b/stream/tests/output/memory_server_test.out new file mode 100644 index 000000000..7cd9533e7 --- /dev/null +++ b/stream/tests/output/memory_server_test.out @@ -0,0 +1,23 @@ +Size: 12 +Pos: 0 +Seeking... +Pos: 3 +Reading: 4 +Four bytes: lo w +Eof: 0 +Pos: 7 +Seeking again... +Pos: 12 +Eof: 1 +Seek to 6 +Eof: 0 +Pos: 6 +Over-reading: 6 +Result: world +Eof: 1 +Pos: 12 +Finally, reading the entire string: 11 +Result: hello world +Eof: 0 +Pos: 11 +Entire stream from pointer: hello world diff --git a/stream/tests/output/ogre_client_test.out b/stream/tests/output/ogre_client_test.out new file mode 100644 index 000000000..62cd14604 --- /dev/null +++ b/stream/tests/output/ogre_client_test.out @@ -0,0 +1,5 @@ +Name: hello +As string: hello world +pos=11 eof=1 +pos=0 eof=0 +pos=3 eof=0 diff --git a/stream/tests/output/slice_filter_test.out b/stream/tests/output/slice_filter_test.out new file mode 100644 index 000000000..6d84704a7 --- /dev/null +++ b/stream/tests/output/slice_filter_test.out @@ -0,0 +1,36 @@ + +Slice 1: +-------- +Size: 6 +Pos: 0 +Seeking... +Reading 6 bytes +Result: hello +Pos: 6 +Eof: 1 +Seeking: +Pos: 2 +Eof: 0 +Reading 4 bytes +Result: llo +Pos: 6 +Eof: 1 +Entire stream as pointer: hello + +Slice 2: +-------- +Size: 6 +Pos: 0 +Seeking... +Reading 6 bytes +Result: world +Pos: 6 +Eof: 1 +Seeking: +Pos: 2 +Eof: 0 +Reading 4 bytes +Result: rld +Pos: 6 +Eof: 1 +Entire stream as pointer: world diff --git a/stream/tests/test.sh b/stream/tests/test.sh new file mode 100755 index 000000000..b1ca6f1a6 --- /dev/null +++ b/stream/tests/test.sh @@ -0,0 +1,18 @@ +#!/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 diff --git a/testall.sh b/testall.sh new file mode 100755 index 000000000..b2cc3059d --- /dev/null +++ b/testall.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +function run() +{ + cd "$1/tests/" + ./test.sh + cd ../../ +} + +run stream +run vfs +run sound +run . diff --git a/tests/output/ogrevfs_audiere_openal_test.out b/tests/output/ogrevfs_audiere_openal_test.out new file mode 100644 index 000000000..28ea8a71b --- /dev/null +++ b/tests/output/ogrevfs_audiere_openal_test.out @@ -0,0 +1 @@ +Playing 'owl.ogg' from 'sound.zip' diff --git a/tests/test.sh b/tests/test.sh new file mode 100755 index 000000000..b1ca6f1a6 --- /dev/null +++ b/tests/test.sh @@ -0,0 +1,18 @@ +#!/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 diff --git a/vfs/tests/output/dummy_test.out b/vfs/tests/output/dummy_test.out new file mode 100644 index 000000000..61f1fda80 --- /dev/null +++ b/vfs/tests/output/dummy_test.out @@ -0,0 +1,31 @@ +Listing all files: +name: file1 +basename: file1 +isDir: 0 +size: 1 +time: 0 +name: dir/file2 +basename: file2 +isDir: 0 +size: 2 +time: 0 + +Stat for single files: +name: file1 +basename: file1 +isDir: 0 +size: 1 +time: 0 + +name: dir/file2 +basename: file2 +isDir: 0 +size: 2 +time: 0 + +name: dir +basename: dir +isDir: 1 +size: 0 +time: 0 +filesize: 11 diff --git a/vfs/tests/output/ogre_client_test.out b/vfs/tests/output/ogre_client_test.out new file mode 100644 index 000000000..bc10b1e5c --- /dev/null +++ b/vfs/tests/output/ogre_client_test.out @@ -0,0 +1,12 @@ +Case: 1 +Name: dummy +Type: Mangle +All files: + file1 + dir/file2 +Non-recursive: + file1 +Dirs: + dir +filesize: 11 +contents: hello world diff --git a/vfs/tests/output/ogre_resource_test.out b/vfs/tests/output/ogre_resource_test.out new file mode 100644 index 000000000..99b2c91ba --- /dev/null +++ b/vfs/tests/output/ogre_resource_test.out @@ -0,0 +1,20 @@ + +File: Makefile +Size: 814 +First line: GCC=g++ -I../ + +File: ogre_resource_test.cpp +Size: 1437 +First line: #include + +File: bleh +Does not exist + +All source files: + physfs_server_test.cpp + dummy_test.cpp + ogre_resource_test.cpp + server_common.cpp + dummy_vfs.cpp + ogre_client_test.cpp + ogre_server_test.cpp diff --git a/vfs/tests/output/ogre_server_test.out b/vfs/tests/output/ogre_server_test.out new file mode 100644 index 000000000..b00752eae --- /dev/null +++ b/vfs/tests/output/ogre_server_test.out @@ -0,0 +1,11 @@ + +File: Makefile +Size: 814 +First 12 bytes: GCC=g++ -I.. + +File: testfile.txt +Size: 13 +First 12 bytes: hello world! + +File: blah_bleh +File doesn't exist diff --git a/vfs/tests/output/physfs_server_test.out b/vfs/tests/output/physfs_server_test.out new file mode 100644 index 000000000..b00752eae --- /dev/null +++ b/vfs/tests/output/physfs_server_test.out @@ -0,0 +1,11 @@ + +File: Makefile +Size: 814 +First 12 bytes: GCC=g++ -I.. + +File: testfile.txt +Size: 13 +First 12 bytes: hello world! + +File: blah_bleh +File doesn't exist diff --git a/vfs/tests/test.sh b/vfs/tests/test.sh new file mode 100755 index 000000000..b1ca6f1a6 --- /dev/null +++ b/vfs/tests/test.sh @@ -0,0 +1,18 @@ +#!/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