to make the test C app, run:

cd ext
make -f Makefile_c -B
./stata_c_test file.dta

this will compile the application, read file.dta and create a copy of it from the same data in out.dta

to make the test Ruby app, run:

cd ext
ruby extconf.rb
make
./test.rb file.dta

this will do the same, but using the Ruby extension

If the app finds any issues with the data, it will fail an assert, which will give you line numbers to the source.