File: hello-onscripter

package info (click to toggle)
onscripter 20220816-1
  • links: PTS
  • area: main
  • in suites: bookworm, forky, trixie
  • size: 1,408 kB
  • sloc: cpp: 32,308; xml: 114; sh: 100; makefile: 91; python: 10
file content (29 lines) | stat: -rwxr-xr-x 813 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh -e

TEMP=${AUTOPKGTEST_TMP:-${TMPDIR:-$(mktemp -d)}}
TDIR=$(mktemp -d $TEMP/hellozh1XXXXXX)

cp -R debian/tests/hello_data_zh "$TDIR"

iconv -f utf-8 -t sjis -o "$TDIR/hello_data_zh/nscript.sjis.dat" "$TDIR/hello_data_zh/nscript.utf8.dat"
debian/tests/nscriptenc.py < "$TDIR/hello_data_zh/nscript.sjis.dat" > "$TDIR/hello_data_zh/nscript.dat"

S1=`date +%s%N`
START_TIME=`expr $S1 / 1000000`
if [ x"$DEBUG1" = x ]; then
    SDL_VIDEODRIVER=dummy /usr/games/onscripter -r "$TDIR/hello_data_zh"
else
    /usr/games/onscripter -r "$TDIR/hello_data_zh"
fi
S21=`date +%s%N`
S2=`expr $S21 / 1000000`
ELAPSED_TIME=`expr $S2 - $START_TIME`

if [ $ELAPSED_TIME -lt 2000 ]; then
    #too fast. Must be an error.
    echo "Run too fast: $ELAPSED_TIME ms"
    exit 1
fi

echo "Test Passed: $ELAPSED_TIME ms"
exit 0