Here's an article about what a PCM wav file should look like:
https://ccrma.stanford.edu/courses/422/projects/WaveFormat/
Should be able to write a little script of some kind to check out the headers and make sure they look OK.
Update:
http://www.sendspace.com/file/cdy1hk
Here's a small utility that may suit your need. It checks the file, outputs some information on the file, and exits. The return code is 0 if successful, nonzero if there's a problem with the file.
It is written in Python and depends on the Python wave library. You can extract the .py file from the zip and examine/run independently, or use the compiled exe along with the support files included.
Seems to work OK for e.g. files output by lame --decode, and catches when I truncate a WAV (checks to make sure the file size is sane).
There is no way to determine if the PCM data has been corrupted without e.g. external checksums, etc.
Update:
Added a bit better error checking. Compiled exe version freaks out when wavcheck.py is in the same folder, so I stuck it in a subfolder (/src). Lol. Updated link above to new file.
Update:
I took a look at shntool as suggested by @boehj -- looks like good software for checking WAV files, and it has nice detailed output. Its output could be trivially parsed or its source code modified to allow for an all-OK exit status in 'info' and/or 'len' mode. As it stands, it has exit code 0 even when it is reporting problems with the file.
Homepage for shntool: http://www.etree.org/shnutils/shntool/
shntoolthat may be of use? – boehj May 6 '11 at 18:24