Commit 11a2afc5541923e9fc30fdf6227c191df9276d67

Thomas de Grivel 2023-08-02T12:23:31

wip tests

diff --git a/libc3/buf_parse.c b/libc3/buf_parse.c
index 16a881d..88eda60 100644
--- a/libc3/buf_parse.c
+++ b/libc3/buf_parse.c
@@ -677,7 +677,7 @@ sw buf_parse_call_op_unary (s_buf *buf, s_call *dest)
   if ((r = buf_ignore_spaces(buf)) < 0)
     goto restore;
   result += r;
-  if ((r = buf_parse_tag(buf, &tmp.arguments->tag)) <= 0)
+  if ((r = buf_parse_tag_primary(buf, &tmp.arguments->tag)) <= 0)
     goto restore;
   result += r;
   *dest = tmp;
diff --git a/test/facts_test.c b/test/facts_test.c
index 22c5400..127e2e0 100644
--- a/test/facts_test.c
+++ b/test/facts_test.c
@@ -497,7 +497,7 @@ TEST_CASE(facts_open_file)
   if (r > 0)
     errx(1, "%s:%i: cp", __FILE__, __LINE__);
   str_init_1(&path, NULL, "facts_test_open_file.2.facts");
-  TEST_EQ(facts_open_file(&facts, &path), 1493);
+  TEST_EQ(facts_open_file(&facts, &path), 1523);
   TEST_EQ(facts_count(&facts), 46);
   i = 0;
   while (p[i]) {
diff --git a/test/facts_test_open_file.2.expected.facts b/test/facts_test_open_file.2.expected.facts
index f1449ea..e49f9ef 100644
--- a/test/facts_test_open_file.2.expected.facts
+++ b/test/facts_test_open_file.2.expected.facts
@@ -37,8 +37,8 @@ add {11, 11, 11}
 add {257, 257, 257}
 add {65537, 65537, 65537}
 add {4294967297, 4294967297, 4294967297}
-add {(()), (()), (())}
-add {((()), ()), ((()), ()), ((()), ())}
+add {(() | ()), (() | ()), (() | ())}
+add {((() | ()), ()), ((() | ()), ()), ((() | ()), ())}
 add {"b", "b", "b"}
 add {B, B, B}
 add {:b, :b, :b}
diff --git a/test/facts_test_open_file.2.facts b/test/facts_test_open_file.2.facts
deleted file mode 100644
index f1449ea..0000000
--- a/test/facts_test_open_file.2.facts
+++ /dev/null
@@ -1,48 +0,0 @@
-%{module: C3.Facts.Dump,
-  version: 1}
-add {a, a, a}
-add {-18446744073709551616, -18446744073709551616, -18446744073709551616}
-add {18446744073709551616, 18446744073709551616, 18446744073709551616}
-add {-4294967296, -4294967296, -4294967296}
-add {-65536, -65536, -65536}
-add {-256, -256, -256}
-add {-10, -10, -10}
-add {-1, -1, -1}
-add {0, 0, 0}
-add {1, 1, 1}
-add {10, 10, 10}
-add {256, 256, 256}
-add {65536, 65536, 65536}
-add {4294967296, 4294967296, 4294967296}
-add {(), (), ()}
-add {((), ()), ((), ()), ((), ())}
-add {"a", "a", "a"}
-add {A, A, A}
-add {:a, :a, :a}
-add {{a, b}, {a, b}, {a, b}}
-add {{:a, :b}, {:a, :b}, {:a, :b}}
-add {{{a, b}, {c, d}}, {{a, b}, {c, d}}, {{a, b}, {c, d}}}
-add {{{:a, :b}, {:c, :d}}, {{:a, :b}, {:c, :d}}, {{:a, :b}, {:c, :d}}}
-add {b, b, b}
-add {-18446744073709551617, -18446744073709551617, -18446744073709551617}
-add {18446744073709551617, 18446744073709551617, 18446744073709551617}
-add {-4294967297, -4294967297, -4294967297}
-add {-65537, -65537, -65537}
-add {-257, -257, -257}
-add {-11, -11, -11}
-add {-2, -2, -2}
-add {2, 2, 2}
-add {3, 3, 3}
-add {11, 11, 11}
-add {257, 257, 257}
-add {65537, 65537, 65537}
-add {4294967297, 4294967297, 4294967297}
-add {(()), (()), (())}
-add {((()), ()), ((()), ()), ((()), ())}
-add {"b", "b", "b"}
-add {B, B, B}
-add {:b, :b, :b}
-add {{b, b}, {b, b}, {b, b}}
-add {{:b, :b}, {:b, :b}, {:b, :b}}
-add {{{b, b}, {c, d}}, {{b, b}, {c, d}}, {{b, b}, {c, d}}}
-add {{{:b, :b}, {:c, :d}}, {{:b, :b}, {:c, :d}}, {{:b, :b}, {:c, :d}}}
diff --git a/test/facts_test_open_file.2.in.facts b/test/facts_test_open_file.2.in.facts
index f1449ea..e49f9ef 100644
--- a/test/facts_test_open_file.2.in.facts
+++ b/test/facts_test_open_file.2.in.facts
@@ -37,8 +37,8 @@ add {11, 11, 11}
 add {257, 257, 257}
 add {65537, 65537, 65537}
 add {4294967297, 4294967297, 4294967297}
-add {(()), (()), (())}
-add {((()), ()), ((()), ()), ((()), ())}
+add {(() | ()), (() | ()), (() | ())}
+add {((() | ()), ()), ((() | ()), ()), ((() | ()), ())}
 add {"b", "b", "b"}
 add {B, B, B}
 add {:b, :b, :b}
diff --git a/test/facts_test_open_file.3.expected.facts b/test/facts_test_open_file.3.expected.facts
index 903f90d..34357b8 100644
--- a/test/facts_test_open_file.3.expected.facts
+++ b/test/facts_test_open_file.3.expected.facts
@@ -73,8 +73,8 @@ add {"b", "b", "b"}
 add {:b, :b, :b}
 add {B, B, B}
 add {b, b, b}
-add {(()), (()), (())}
-add {((()), ()), ((()), ()), ((()), ())}
+add {(() | ()), (() | ()), (() | ())}
+add {((() | ()), ()), ((() | ()), ()), ((() | ()), ())}
 add {{:b, :b}, {:b, :b}, {:b, :b}}
 add {{{:b, :b}, {:c, :d}}, {{:b, :b}, {:c, :d}}, {{:b, :b}, {:c, :d}}}
 add {{b, b}, {b, b}, {b, b}}