swc/ecmascript/minifier/scripts/add-golden.sh
강동윤 d20c1d3089
feat(es/minifier): Implement more rules (#1717)
swc_ecma_minifier:
 - Implement `global-defs` pass.
 - Implement `properties` pass partially.
2021-05-21 15:57:17 +09:00

16 lines
352 B
Bash
Executable File

#!/usr/bin/env bash
#
# This script automatically add tests to golden.
# Note that this is append-only.
set -eu
cargo test --test compress --all-features \
| grep 'js .\.\. ok$' \
| sed -e 's!test fixture_terser__compress__!!' \
| sed -e 's! ... ok!!' \
| sed -e 's!__!/!g' \
| sed -e 's!_js!.js!' \
>> tests/golden.txt
./scripts/sort.sh