Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
.PHONY: jstest
jstest: stamp/jstest
-stamp/jstest: jstest/run jstest/wasmtest.nodejs stamp/wasm-bindgen-jstest
+stamp/jstest: jstest/run jstest/wasmtest.nodejs templates/script.js \
+ stamp/wasm-bindgen-jstest
$(NAILING_CARGO_JUST_RUN) $(abspath $(filter-out stamp/%,$^))
$(stamp)
export NODE_PATH=.
ln -sf "$@" .
-nodejs wasmtest.nodejs
+exec 3>run.js
+sed >&3 <script.js '/^\/\/@@notest/,/^\/\/@@/d'
+cat >&3 wasmtest.nodejs
+exec 3>&-
+
+nodejs run.js
const fs = require('fs');
let wasm_bindgen = require('otter_wasm.js');
-//eval(fs.readFileSync('./otter_wasm.js')+'');
-
let dc = wasm_bindgen.def_zcoord();
console.log(dc);
// todo scroll of log messages to bottom did not always work somehow
// think I have fixed this with approximation
+//@@notest
doload();