File tree Expand file tree Collapse file tree 3 files changed +55
-1
lines changed
modules/integration/src/test/scala/scala/cli/integration Expand file tree Collapse file tree 3 files changed +55
-1
lines changed Original file line number Diff line number Diff line change @@ -31,4 +31,21 @@ class RunTests212 extends RunTestDefinitions(
31
31
)
32
32
}
33
33
}
34
+ test(" 2.12.nightly" ) {
35
+ TestInputs (os.rel / " sample.sc" -> " println(util.Properties.versionNumberString)" ).fromRoot {
36
+ root =>
37
+ val res =
38
+ os.proc(
39
+ TestUtil .cli,
40
+ " run" ,
41
+ " ." ,
42
+ " -S" ,
43
+ " 2.12.nightly" ,
44
+ TestUtil .extraOptions
45
+ )
46
+ .call(cwd = root)
47
+ val version = res.out.trim()
48
+ expect(version.startsWith(" 2.12" ))
49
+ }
50
+ }
34
51
}
Original file line number Diff line number Diff line change 1
1
package scala .cli .integration
2
2
3
+ import com .eed3si9n .expecty .Expecty .expect
4
+
3
5
// format: off
4
6
class RunTests213 extends RunTestDefinitions (
5
7
scalaVersionOpt = Some (Constants .scala213)
6
- )
8
+ ){
7
9
// format: on
10
+ test(" 2.13.nightly" ) {
11
+ TestInputs (os.rel / " sample.sc" -> " println(util.Properties.versionNumberString)" ).fromRoot {
12
+ root =>
13
+ val res =
14
+ os.proc(
15
+ TestUtil .cli,
16
+ " run" ,
17
+ " ." ,
18
+ " -S" ,
19
+ " 2.13.nightly" ,
20
+ TestUtil .extraOptions
21
+ )
22
+ .call(cwd = root)
23
+ val version = res.out.trim()
24
+ expect(version.startsWith(" 2.13" ))
25
+ }
26
+ }
27
+ }
Original file line number Diff line number Diff line change @@ -47,4 +47,21 @@ class RunTestsDefault extends RunTestDefinitions(scalaVersionOpt = None) {
47
47
archLinuxTest()
48
48
}
49
49
50
+ test(" 3.nightly" ) { // should run code using scala 3 nightly version
51
+ TestInputs (os.rel / " sample.sc" -> """ println("Hello World")""" ).fromRoot {
52
+ root =>
53
+ val res =
54
+ os.proc(
55
+ TestUtil .cli,
56
+ " run" ,
57
+ " ." ,
58
+ " -S" ,
59
+ " 3.nightly" ,
60
+ TestUtil .extraOptions
61
+ )
62
+ .call(cwd = root)
63
+ expect(res.out.trim() == " Hello World" )
64
+ }
65
+ }
66
+
50
67
}
You can’t perform that action at this time.
0 commit comments