Support passing args to the dockerized test runner

This commit is contained in:
Tom Alexander 2020-04-12 15:47:38 -04:00
parent aa24f50dfa
commit 4856fb6d11
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
5 changed files with 21 additions and 1 deletions

View File

@ -23,4 +23,4 @@ USER duster
RUN git clean -dfxq
RUN cargo build
RUN npm link dustjs-linkedin
CMD /home/duster/duster/js/run_compliance_suite.bash
ENTRYPOINT ["/home/duster/duster/js/run_compliance_suite.bash"]

View File

@ -0,0 +1,9 @@
#!/usr/bin/env bash
#
# Runs the full suite of tests against LinkedIn DustJS and duster to compare the result
set -euo pipefail
IFS=$'\n\t'
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$DIR/../"
docker build -t duster . && docker run --rm -i -t duster "${@}"

View File

@ -0,0 +1 @@
Through experimentation I have determined that DustJS erases all preceding whitespace (spaces, tabs, and newlines) but only trims trailing newlines.

View File

@ -0,0 +1 @@
{"name": "Bob"}

View File

@ -0,0 +1,9 @@
Hello {name}!