aboutsummaryrefslogtreecommitdiff
path: root/boca-1.5.0/doc/problemexamples/bits/tests/c
blob: 1a0ca95d1c9d8ac9cf2fe3730d440f315fa07718 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash

cat > test.c <<EOF
int main() {
  char s[100];
  scanf("%s", s);
  printf("%s\n",s);
  return 0;
}
EOF
cat > test.in <<EOF
inputdata
EOF

TL=2
REP=10
../compile/c test.c test.exe TL
../run/c test.exe test.in TL REP
output=`cat stdout0`
if [ "$output" != "inputdata" ]; then
  echo "ERROR"
  exit 1
fi
exit 0