on master help sign in
Merge branch 'master' into webgl
commit2fb6d27c6c634d1b52c162cf7a9e0dc57351a1a2 authorEvan Czaplicki <info@elm-lang.org> dateWed 7 May 2014, 13:16 (12 years ago) parent624d4fe36bf6b6
2 files changed+4−32
.travis.yml+3−31 libraries/Native/String.js+1−1
.travis.yml+3−31
@@ -1,31 +1,3 @@
1−# Based on https://github.com/hvr/multi-ghc-travis and https://github.com/ekmett/lens/blob/master/.travis.yml
2−
3−# NB: don't set `language: haskell` here
4−
5−# The following enables several GHC versions to be tested; often it's enough to test only against the last release in a major GHC version. Feel free to omit lines listings versions you don't need/want testing for.
6−env:
7− - GHCVER=7.6.3
8− - GHCVER=7.8.2
9−
10−# Note: the distinction between `before_install` and `install` is not important.
11−before_install:
12− - travis_retry sudo add-apt-repository -y ppa:hvr/ghc
13− - travis_retry sudo apt-get update
14− - travis_retry sudo apt-get install cabal-install-1.18 ghc-$GHCVER happy alex # see note about happy/alex
15− - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/1.18/bin:$PATH
16− - cabal update
17− # Update happy when building with GHC 7.8 or head
18− - |
19− if [ $GHCVER = "head" ] || [ $GHCVER = "7.8.2" ]; then
20− cabal install happy alex
21− export PATH=$HOME/.cabal/bin:$PATH
22− fi
23−
24−install:
25− - cabal install --only-dependencies --enable-tests --enable-benchmarks
26−
27−# Here starts the actual work to be performed for the package under test; any command which exits with a non-zero exit code causes the build to fail.
28−script:
29− - cabal configure --enable-tests
30− - cabal build
31− - cabal test
1+language: haskell
2+ghc:
3+ - 7.6
libraries/Native/String.js+1−1
@@ -111,7 +111,7 @@ Elm.Native.String.make = function(elm) {
111111 }
112112
113113 function words(str) {
114− return List.fromArray(str.split(/\s+/g));
114+ return List.fromArray(str.trim().split(/\s+/g));
115115 }
116116 function lines(str) {
117117 return List.fromArray(str.split(/\r\n|\r|\n/g));