UNPKG

706 Bapplication/x-shView Raw
1#!/bin/bash
2
3NF="node ../nf.js"
4SED=`which gsed || which sed`
5
6rm -rf sandbox
7mkdir -p sandbox
8
9echo "PATH=something-totally-bogus" > sandbox/.env
10printf "#norun: touch should-not-exist.js\nrun: touch should-exist.js\n# norun: touch should-not-exist-2.js\n" > sandbox/Procfile
11
12node ../nf.js export --out sandbox --env sandbox/.env --type upstart-single --procfile sandbox/Procfile
13
14$SED -i -e "s%$(pwd)%TEST_DIR%g" \
15 -e "s%$(dirname $(which node))%TEST_PATH%g" sandbox/*
16
17# Fixtures can be updated to match output by running `npm test --update-fixtures`
18test -n "$npm_config_update_fixtures" && cp sandbox/* fixtures/procfile-comment/
19
20diff -r -u fixtures/procfile-comment sandbox 1>&2 || exit $?