From 1a4d70a1e20ecc2789f8e897c7ff077702c1a431 Mon Sep 17 00:00:00 2001 From: mununki Date: Thu, 23 May 2024 16:05:44 +0200 Subject: [PATCH 1/4] add test --- testrepo/src/Test.mjs | 3 +++ testrepo/src/Test.res | 3 +++ 2 files changed, 6 insertions(+) diff --git a/testrepo/src/Test.mjs b/testrepo/src/Test.mjs index d60faa78..f12f71f8 100644 --- a/testrepo/src/Test.mjs +++ b/testrepo/src/Test.mjs @@ -3,7 +3,10 @@ var hello = "world"; +var a = 0; + export { hello , + a , } /* No side effect */ diff --git a/testrepo/src/Test.res b/testrepo/src/Test.res index cab79024..5ed5cf69 100644 --- a/testrepo/src/Test.res +++ b/testrepo/src/Test.res @@ -1 +1,4 @@ let hello = "world" + +@genType +let a = 0 From 9ff96281392d110988413a932b425497606a91fa Mon Sep 17 00:00:00 2001 From: mununki Date: Thu, 23 May 2024 16:08:45 +0200 Subject: [PATCH 2/4] check gen file generated --- tests/compile.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/compile.sh b/tests/compile.sh index 2b7173ee..03e2f8c4 100755 --- a/tests/compile.sh +++ b/tests/compile.sh @@ -30,6 +30,14 @@ else exit 1 fi +if ls *.gen.* 1> /dev/null 2>&1; +then + error ".gen.* files found" +else + error ".gen.* files not found" + exit 1 +fi + node ./packages/main/src/Main.mjs > ./packages/main/src/output.txt mv ./packages/main/src/Main.res ./packages/main/src/Main2.res @@ -105,4 +113,4 @@ else done exit 1 -fi \ No newline at end of file +fi From b8c530831043b3ec6cf88e83d1bbd4bf6fdcec78 Mon Sep 17 00:00:00 2001 From: mununki Date: Thu, 23 May 2024 16:13:22 +0200 Subject: [PATCH 3/4] fix --- tests/compile.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/compile.sh b/tests/compile.sh index 03e2f8c4..ac19d1e6 100755 --- a/tests/compile.sh +++ b/tests/compile.sh @@ -32,7 +32,7 @@ fi if ls *.gen.* 1> /dev/null 2>&1; then - error ".gen.* files found" + success ".gen.* files found" else error ".gen.* files not found" exit 1 From a7d81f31e0fc16ac84755807f4af8f0a4a2aedd7 Mon Sep 17 00:00:00 2001 From: mununki Date: Thu, 23 May 2024 16:16:02 +0200 Subject: [PATCH 4/4] fix2 --- tests/compile.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/compile.sh b/tests/compile.sh index ac19d1e6..31bbcf3a 100755 --- a/tests/compile.sh +++ b/tests/compile.sh @@ -30,7 +30,7 @@ else exit 1 fi -if ls *.gen.* 1> /dev/null 2>&1; +if ls ./src/*.gen.* 1> /dev/null 2>&1; then success ".gen.* files found" else