File: neko-test

package info (click to toggle)
neko 2.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 2,384 kB
  • sloc: ansic: 19,385; ml: 4,924; sh: 75; makefile: 22
file content (22 lines) | stat: -rwxr-xr-x 350 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

set -e

testdir=$(mktemp -d)
trap "rm -rf ${testdir}" 0 INT QUIT ABRT PIPE TERM
cd ${testdir}

cat <<'EOF' > test.neko
$print("The virtual machine is working !\n");
test = $loader.loadprim("std@test",0);
test();
$print("Test successful\n");
EOF

nekoc test.neko

echo "compile: OK"

neko test.n | grep -q "Test successful"

echo "run: OK"