summaryrefslogtreecommitdiff
path: root/test/util_test.ml
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2024-11-07 18:02:08 +0000
committerGitHub <noreply@github.com>2024-11-07 18:02:08 +0000
commit196fdd7fdf6dcf751b7364c59e34278bfd0193e3 (patch)
treecfeff0991481c8281e24cf1698b20a76854059a4 /test/util_test.ml
parentdd9271b4304c6b1a5a2576821d1b2b8fd3aa6bf5 (diff)
parent9b90d3cc4da72c13ef4270150e4b547ff03fc813 (diff)
downloadvyconf-196fdd7fdf6dcf751b7364c59e34278bfd0193e3.tar.gz
vyconf-196fdd7fdf6dcf751b7364c59e34278bfd0193e3.zip
Merge pull request #11 from jestabro/vyconf-minimal
T6718: use the vyconf daemon for validation of set commands
Diffstat (limited to 'test/util_test.ml')
-rw-r--r--test/util_test.ml12
1 files changed, 8 insertions, 4 deletions
diff --git a/test/util_test.ml b/test/util_test.ml
index 2f5bf5d..5e348fc 100644
--- a/test/util_test.ml
+++ b/test/util_test.ml
@@ -1,22 +1,26 @@
+[@@@ocaml.warning "-27"]
+
open OUnit2
-open Util
+
+module RT = Vyos1x.Reference_tree
+module U = Vyos1x.Util
let test_find_xml_child_existent test_ctxt =
let elem = Xml.Element ("foo", [],
[Xml.Element ("bar", [], []);
Xml.PCData "baz"])
in
- match (find_xml_child "bar" elem) with
+ match (RT.find_xml_child "bar" elem) with
| None -> assert_failure "find_xml_child returned None"
| Some x -> assert_equal (Xml.tag x) "bar"
let test_find_xml_child_nonexistent test_ctxt =
let elem = Xml.Element ("foo", [], [Xml.Element ("quux", [], [])]) in
- assert_equal (find_xml_child "bar" elem) None
+ assert_equal (RT.find_xml_child "bar" elem) None
let test_string_of_list test_ctxt =
let path = ["foo"; "bar"; "baz"] in
- assert_equal (String.trim (string_of_list path)) "foo bar baz"
+ assert_equal (String.trim (U.string_of_list path)) "foo bar baz"
let suite =
"Util tests" >::: [