From 48476260db309c428c3e8cbf45095ba18fad548f Mon Sep 17 00:00:00 2001 From: philippepons Date: Thu, 7 Mar 2024 14:32:14 +0100 Subject: [PATCH] test fonctionnement CI --- .github/workflows/dots-CI.yml | 4 ++-- tests/launcher.xq | 8 ++++++++ tests/utilsTest.xqm | 29 +++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 tests/launcher.xq create mode 100644 tests/utilsTest.xqm diff --git a/.github/workflows/dots-CI.yml b/.github/workflows/dots-CI.yml index c704017..2226be5 100644 --- a/.github/workflows/dots-CI.yml +++ b/.github/workflows/dots-CI.yml @@ -22,6 +22,6 @@ jobs: cd basex chmod +x bin/basex - - name: Run Initial Test on DTS Endpoints + - name: Run DoTS XQuery Tests run: | - ./basex/bin/basex ./basexhttp + ./basex/bin/basex ./tests/launcher.xq diff --git a/tests/launcher.xq b/tests/launcher.xq new file mode 100644 index 0000000..5a2e109 --- /dev/null +++ b/tests/launcher.xq @@ -0,0 +1,8 @@ +xquery version '3.0' ; + +import module namespace test = "https://github.com/chartes/dots/tests" at "utilsTest.xqm"; + + +(: :) +test:check-metadata-output() + diff --git a/tests/utilsTest.xqm b/tests/utilsTest.xqm new file mode 100644 index 0000000..5f301df --- /dev/null +++ b/tests/utilsTest.xqm @@ -0,0 +1,29 @@ +xquery version '3.0' ; + +module namespace test = "https://github.com/chartes/dots/tests"; + +declare namespace dc = "http://purl.org/dc/elements/1.1/"; +declare namespace dct = "http://purl.org/dc/terms/"; + +import module namespace G = "https://github.com/chartes/dots/globals" at "../globals.xqm"; +import module namespace dots.lib = "https://github.com/chartes/dots/lib" at "../lib/resources_register_builder.xqm"; + +declare variable $test:dbTestName := "encpos"; + +(: UtilsTest.xqm +: +: Module pour tester (...) +:) + +declare function test:fixture-OK() { + "vador" +}; + +(: Documentation du test :) +declare %unit:test function test:check-metadata-output() { + let $expected := + "vador" + return + unit:assert-equals(test:fixture-OK(), $expected) +}; +