Skip to content

Commit

Permalink
Convert test/00/generators.sh to python, and fix broken test.
Browse files Browse the repository at this point in the history
  • Loading branch information
highperformancecoder committed May 22, 2024
1 parent a832b2c commit e194978
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions test/00/generators.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,20 @@ pass()
}

trap "fail" 1 2 3 15
cat >input.tcl <<EOF
minsky.addVariable gen parameter
cat >input.py <<EOF
import sys
sys.path.append('$here')
from pyminsky import minsky
foreach op {eye one zero iota} {
minsky.canvas.itemFocus.init "[set op](3,3)"
minsky.reset
minsky.canvas.itemFocus.exportAsCSV [set op].csv
}
minsky.canvas.addVariable('gen','parameter')
tcl_exit
for op in ['eye', 'one', 'zero', 'iota']:
minsky.canvas.itemFocus().init(f'{op}(3,3)')
minsky.reset()
minsky.canvas.itemFocus().exportAsCSV(f'{op}.csv')
EOF

$here/gui-tk/minsky input.tcl
python3 input.py
if [ $? -ne 0 ]; then fail; fi

for i in *.csv; do
Expand Down

0 comments on commit e194978

Please sign in to comment.