Flatten embedded VCs in vc conversion tool
Change-Id: Idcbad5f8e77d3fe6dc69d439b87ccf355360bd5b
diff --git a/tools/t/list2vc-def.t b/tools/t/list2vc-def.t
index d60ca8d..baaefda 100644
--- a/tools/t/list2vc-def.t
+++ b/tools/t/list2vc-def.t
@@ -50,15 +50,14 @@
is($json->{'collection'}->{'@type'}, 'koral:docGroup', 'type');
is($json->{'collection'}->{'operation'}, 'operation:or', 'operation');
-# is($json->{'collection'}->{'comment'}, 'Name: "VAS-N91 (Stand \"2013\", korr. 2017)"', 'type');
-is($json->{'collection'}->{'comment'}, 'Name: "VAS N91"', 'type');
+is($json->{'collection'}->{'comment'}, 'name:"VAS-N91 (Stand \"2013\", korr. 2017)"', 'type');
$op1 = $json->{'collection'}->{'operands'}->[0];
is($op1->{'@type'}, 'koral:doc', 'type');
is($op1->{'key'}, 'textSigle', 'key');
is($op1->{'match'}, 'match:eq', 'match');
is($op1->{'value'}->[0], "A00/APR/23232", 'value');
-is($op1->{'value'}->[1], ,"A00/APR/23233", 'value');
+is($op1->{'value'}->[1], "A00/APR/23233", 'value');
my $list4 = catfile(dirname(__FILE__), 'data', 'list4.def');
@@ -68,8 +67,15 @@
is($json->{'collection'}->{'@type'}, 'koral:docGroup', 'type');
is($json->{'collection'}->{'operation'}, 'operation:or', 'operation');
-# is($json->{'collection'}->{'comment'}, 'Name: "VAS-N91 (Stand \"2013\", korr. 2017)"', 'type');
-is($json->{'collection'}->{'comment'}, 'Name: "VAS N91"', 'type');
+like($json->{'collection'}->{'comment'}, qr!^name:"VAS N91"!, 'name');
+like($json->{'collection'}->{'comment'}, qr!embed:\[name:"Berliner Zeitung",redabs:143237\]!, 'embed');
+like($json->{'collection'}->{'comment'}, qr!embed:\[name:"Frankfurter Allgemeine",redabs:301166\]!, 'embed');
+$op1 = $json->{'collection'}->{'operands'}->[0];
+is($op1->{'@type'}, 'koral:doc', 'type');
+is($op1->{'key'}, 'corpusSigle', 'key');
+is($op1->{'match'}, 'match:eq', 'match');
+is($op1->{'value'}->[0], "F97", 'value');
+is($op1->{'value'}->[1], "F99", 'value');
done_testing;