diff options
Diffstat (limited to 'tests/cgalstlsanitytest')
-rwxr-xr-x | tests/cgalstlsanitytest | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/cgalstlsanitytest b/tests/cgalstlsanitytest new file mode 100755 index 0000000..0ec9ef4 --- /dev/null +++ b/tests/cgalstlsanitytest @@ -0,0 +1,16 @@ +#!/usr/bin/env python + +import re, sys, subprocess, os + +stlfile = sys.argv[3] + '.stl' + +subprocess.check_call([sys.argv[2], sys.argv[1], '-o', stlfile]) + +result = open(stlfile).read() + +os.unlink(stlfile) + +if 'nan' in result or 'inf' in result: + sys.exit(1) + +open(sys.argv[3], 'w').write('') # this check only works on return values |