summaryrefslogtreecommitdiff
path: root/p/haskell-language-javascript/debian/patches/fix-testsuite
blob: 0850140cbc659212d35dd714591788b8782076cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Description: Fix testsuite

Author: Joachim Breitner <nomeata@debian.org>
Bug: https://github.com/alanz/language-javascript/issues/20
Bug: https://github.com/alanz/language-javascript/issues/21
Forwarded: https://github.com/alanz/language-javascript/pull/20

--- haskell-language-javascript-0.5.6.orig/language-javascript.cabal
+++ haskell-language-javascript-0.5.6/language-javascript.cabal
@@ -72,7 +72,6 @@ Test-Suite test-language-javascript
                  , blaze-builder    >= 0.2     && < 1
                  -- need our own library for tests
                  , language-javascript >= 0.5.5
-  hs-source-dirs: . src ./dist/build


 source-repository head
--- haskell-language-javascript-0.5.6.orig/runtests.hs
+++ haskell-language-javascript-0.5.6/runtests.hs
@@ -294,7 +294,7 @@ testSuite = testGroup "Parser"

    , testCase "unicode4" (testProg "x=\"àáâãäå\";y='\3012a\0068'" "Right (JSSourceElementsTop [JSExpression [JSIdentifier \"x\",JSOperator JSLiteral \"=\",JSStringLiteral '\"' \"\\224\\225\\226\\227\\228\\229\"],JSLiteral \";\",JSExpression [JSIdentifier \"y\",JSOperator JSLiteral \"=\",JSStringLiteral '\\'' \"\\3012aD\"],JSLiteral \"\"])")

-   , testCase "unicode5f" (testFile "./test/Unicode.js" "JSSourceElementsTop [JSExpression [JSIdentifier \"\\224\\225\\226\\227\\228\\229\",JSOperator JSLiteral \"=\",JSDecimal \"1\"],JSLiteral \";\",JSLiteral \"\"]")
+--   , testCase "unicode5f" (testFile "./test/Unicode.js" "JSSourceElementsTop [JSExpression [JSIdentifier \"\\224\\225\\226\\227\\228\\229\",JSOperator JSLiteral \"=\",JSDecimal \"1\"],JSLiteral \";\",JSLiteral \"\"]")

    , testCase "bug2.a" (testProg "function() {\nz = function /*z*/(o) {\nreturn r;\n};}" "Right (JSSourceElementsTop [JSExpression [JSFunctionExpression [] [] (JSBlock ([JSExpression [JSIdentifier \"z\",JSOperator JSLiteral \"=\",JSFunctionExpression [] [JSIdentifier \"o\"] (JSBlock ([JSReturn [JSExpression [JSIdentifier \"r\"]] JSLiteral \";\"]))],JSLiteral \";\"]))],JSLiteral \"\"])")