Skip to content

Commit ee8ff7f

Browse files
Merge pull request #5534 from dotty-staging/add-regression-test-for-decompile-form-file
Add regression test for `dotc -decompile xyz.tasty`
2 parents 63f73a3 + 99b33c8 commit ee8ff7f

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

project/scripts/cmdTests

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ echo "testing sbt dotc -decompile"
1818
"$SBT" ";dotc -decompile -color:never -classpath $OUT $MAIN" > "$tmp"
1919
grep -qe "def main(args: scala.Array\[scala.Predef.String\]): scala.Unit =" "$tmp"
2020

21+
echo "testing sbt dotc -decompile from file"
22+
"$SBT" ";dotc -decompile -color:never -classpath $OUT $OUT/$TASTY" > "$tmp"
23+
grep -qe "def main(args: scala.Array\[scala.Predef.String\]): scala.Unit =" "$tmp"
24+
2125
echo "testing sbt dotr with no -classpath"
2226
clear_out "$OUT"
2327
"$SBT" ";dotc $SOURCE ; dotr $MAIN" > "$tmp"

project/scripts/cmdTestsCommon.inc.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ SBT="./project/scripts/sbt" # if run on CI
55

66
SOURCE="tests/pos/HelloWorld.scala"
77
MAIN="HelloWorld"
8+
TASTY="HelloWorld.tasty"
89
EXPECTED_OUTPUT="hello world"
910

1011
OUT=$(mktemp -d)

0 commit comments

Comments
 (0)