Skip to content

Commit 70d1a34

Browse files
committed
Demonstrate failing test
1 parent 8745399 commit 70d1a34

File tree

5 files changed

+27
-4
lines changed

5 files changed

+27
-4
lines changed

.travis.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,4 @@ before_install:
2323
- cat ~/.bazelrc >> .bazelrc
2424

2525
script:
26-
- bazel build test/...
27-
- bazel run test:ScalaBinary
28-
- bazel test test/...
26+
- test_run.sh
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
see ya
2+
later
3+
A hui hou

test/src/main/scala/scala/test/ScalaLibBinary.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ package scala.test
1717
object ScalaLibBinary {
1818
def main(args:Array[String]) {
1919
ScalaLibResources.getGreetings foreach println
20+
ScalaLibResources.getFarewells foreach println
2021
}
2122
}

test/src/main/scala/scala/test/ScalaLibResources.scala

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,15 @@
1515
package scala.test
1616

1717
object ScalaLibResources {
18-
def getGreetings() = scala.io.Source.fromInputStream(getClass.getResourceAsStream("hellos")).getLines.toList
18+
def getGreetings() =
19+
scala.io.Source
20+
.fromInputStream(getClass.getResourceAsStream("hellos"))
21+
.getLines
22+
.toList
23+
24+
def getFarewells() =
25+
scala.io.Source
26+
.fromInputStream(getClass.getResourceAsStream("byes"))
27+
.getLines
28+
.toList
1929
}

test_run.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
bazel build test/... \
6+
&& bazel run test:ScalaBinary \
7+
&& bazel run test:ScalaLibBinary \
8+
&& bazel test test/...
9+
10+
# TODO: this is also broken
11+
# && bazel run test:JavaBinary \

0 commit comments

Comments
 (0)