#!/bin/bash

rm -rf ./*.wast ./list.js

git clone https://github.com/WebAssembly/spec spec
mv spec/ml-proto/test/*.wast ./
rm -rf spec/

echo "// This is automatically generated by import_tests.sh. Do no modify by hand!" > list.js
echo "var specTests = [];" >> list.js
for i in $(ls *.wast);
do
    echo "specTests.push(\"$i\");" >> list.js
done;
