diff options
author | Vincent Ambo <tazjin@google.com> | 2019-07-04T10·18+0100 |
---|---|---|
committer | Vincent Ambo <tazjin@google.com> | 2019-07-04T10·18+0100 |
commit | f723b8b878a3c4a4687b9e337a875500bebb39b1 (patch) | |
tree | e85204cf042c355e90cff61c111e7d8cd15df311 /third_party/bazel/rules_haskell/tests/encoding | |
parent | 2eb1dc26e42ffbdc168f05ef744bd4b4f3e4c36f (diff) |
feat(third_party/bazel): Check in rules_haskell from Tweag r/17
Diffstat (limited to 'third_party/bazel/rules_haskell/tests/encoding')
4 files changed, 37 insertions, 0 deletions
diff --git a/third_party/bazel/rules_haskell/tests/encoding/BUILD.bazel b/third_party/bazel/rules_haskell/tests/encoding/BUILD.bazel new file mode 100644 index 000000000000..588d13f6d0b7 --- /dev/null +++ b/third_party/bazel/rules_haskell/tests/encoding/BUILD.bazel @@ -0,0 +1,21 @@ +load( + "@io_tweag_rules_haskell//haskell:haskell.bzl", + "haskell_test", +) + +package(default_testonly = 1) + +haskell_test( + name = "encoding", + srcs = [ + "Main.hs", + "TH.hs", + ], + extra_srcs = [ + "unicode.txt", + ], + deps = [ + "//tests/hackage:base", + "//tests/hackage:template-haskell", + ], +) diff --git a/third_party/bazel/rules_haskell/tests/encoding/Main.hs b/third_party/bazel/rules_haskell/tests/encoding/Main.hs new file mode 100644 index 000000000000..beb5f2a29497 --- /dev/null +++ b/third_party/bazel/rules_haskell/tests/encoding/Main.hs @@ -0,0 +1,8 @@ +{-# LANGUAGE TemplateHaskell #-} + +module Main (main) where + +import TH + +main :: IO () +main = putStrLn $foo diff --git a/third_party/bazel/rules_haskell/tests/encoding/TH.hs b/third_party/bazel/rules_haskell/tests/encoding/TH.hs new file mode 100644 index 000000000000..8cb52b3f1139 --- /dev/null +++ b/third_party/bazel/rules_haskell/tests/encoding/TH.hs @@ -0,0 +1,7 @@ +module TH (foo) where + +import Language.Haskell.TH +import Language.Haskell.TH.Syntax (lift) + +foo :: Q Exp +foo = runIO (readFile "tests/encoding/unicode.txt") >>= lift diff --git a/third_party/bazel/rules_haskell/tests/encoding/unicode.txt b/third_party/bazel/rules_haskell/tests/encoding/unicode.txt new file mode 100644 index 000000000000..74e5f2638d08 --- /dev/null +++ b/third_party/bazel/rules_haskell/tests/encoding/unicode.txt @@ -0,0 +1 @@ +Некоторый текст на русском. |