File: test

package info (click to toggle)
node-regjsparser 0.12.0%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 488 kB
  • sloc: javascript: 1,196; makefile: 9
file content (14 lines) | stat: -rw-r--r-- 334 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# There's little point on testing during build
if [ -f package.json ]; then
  exit 0
fi

echo "Testing if regjsparser can parse a trivial regex"
cat > test.js <<HERE
parse=require('regjsparser').parse;
ast=parse('a');
process.stdout.write(JSON.stringify(ast));
ast.codePoint==97 || process.exit(1);
process.exit(0);
HERE
node test.js