From ac23d69f4b57832519e6565e089e086cbfe667ed Mon Sep 17 00:00:00 2001 From: martyall Date: Wed, 13 Sep 2023 08:35:23 -0700 Subject: [PATCH] failing test --- .github/workflows/ci.yaml | 29 +++++++++++++++++++++++++++++ .gitignore | 1 + test/Main.purs | 4 ++++ 3 files changed, 34 insertions(+) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..ecfdc2c --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,29 @@ +name: CI + +on: push + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: purescript-contrib/setup-purescript@main + + - name: Cache PureScript dependencies + uses: actions/cache@v2 + # This cache uses the .dhall files to know when it should reinstall + # and rebuild packages. It caches both the installed packages from + # the `.spago` directory and compilation artifacts from the `output` + # directory. When restored the compiler will rebuild any files that + # have changed. If you do not want to cache compiled output, remove + # the `output` path. + with: + key: ${{ runner.os }}-spago-${{ hashFiles('**/*.dhall') }} + path: | + .spago + output + + - run: spago -x test.dhall build + + - run: spago -x test.dhall test diff --git a/.gitignore b/.gitignore index 332b6cf..29cac07 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ /.* !/.gitignore +!/.github !/.eslintrc.json !/.travis.yml /bower_components/ diff --git a/test/Main.purs b/test/Main.purs index a3e4b3d..488d44f 100644 --- a/test/Main.purs +++ b/test/Main.purs @@ -87,6 +87,10 @@ main = do quickCheck $ fromString "ABCD" Hex === Just (withOctets pack [0xAB, 0xCD]) -- this line is commented out as for invalid input result is `pack []` and shuold be fixed later -- quickCheck $ fromString "LOL" Hex === Nothing + + log "utf8" + quickCheck $ \(s :: String) -> fromUTF8 (toUTF8 s) === s + where subL a b = a - runQuotient b