diff options
Diffstat (limited to 'tests/echotest')
-rwxr-xr-x | tests/echotest | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/echotest b/tests/echotest index 9e29878..bad382c 100755 --- a/tests/echotest +++ b/tests/echotest @@ -1,5 +1,9 @@ -#!/bin/sh +#!/usr/bin/env python -openscad $1 -o null 2> $2 +import re, sys, subprocess -sed 's/-\?[0-9].[0-9]*e-[0-9]\{2,\}/0/g' -i $2 +result = subprocess.check_output([sys.argv[2], sys.argv[1], '-o', 'null'], stderr=subprocess.STDOUT) + +result = re.sub(r'-?[0-9].[0-9]*e-[0-9]{2,}', '0', result) + +open(sys.argv[3], 'w').write(result) |