From c0b59bc92cdea726fccfd7feee5ff427131ad1e1 Mon Sep 17 00:00:00 2001
From: Adam Radziszewski <adam.radziszewski@pwr.wroc.pl>
Date: Fri, 6 May 2011 11:28:55 +0200
Subject: [PATCH] test for first (failing)

---
 .../rules-data/match/postcond2/cclmatch5.ccl  | 14 ++++
 .../match/postcond2/cclmatch5.out.xml         | 80 +++++++++++++++++++
 2 files changed, 94 insertions(+)
 create mode 100644 tests/rules-data/match/postcond2/cclmatch5.ccl
 create mode 100644 tests/rules-data/match/postcond2/cclmatch5.out.xml

diff --git a/tests/rules-data/match/postcond2/cclmatch5.ccl b/tests/rules-data/match/postcond2/cclmatch5.ccl
new file mode 100644
index 0000000..51ff9f0
--- /dev/null
+++ b/tests/rules-data/match/postcond2/cclmatch5.ccl
@@ -0,0 +1,14 @@
+apply(
+  match(
+    repeat(
+      optional(equal(orth[0], "not:here")),
+      equal(class[0], adj),
+      optional(equal(orth[0], "not:there"))
+    )
+  ),
+  // first(M) -> position
+  // regex… -> starting with w
+  cond(regex(orth[first(M)], "w.*")),
+  //cond(debug(orth[first(M)])),
+  actions(mark(M,"C"))
+)
diff --git a/tests/rules-data/match/postcond2/cclmatch5.out.xml b/tests/rules-data/match/postcond2/cclmatch5.out.xml
new file mode 100644
index 0000000..c45a8fc
--- /dev/null
+++ b/tests/rules-data/match/postcond2/cclmatch5.out.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE cesAna SYSTEM "xcesAnaIPI.dtd">
+<cesAna xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" type="lex disamb">
+<chunkList>
+ <chunk>
+  <sentence>
+   <tok>
+    <orth>Dwa</orth>
+    <lex><base>dwa</base><ctag>other</ctag></lex>
+    <ann chan="A">1</ann>
+    <ann chan="B" head="1">1</ann>
+    <ann chan="C">0</ann>
+   </tok>
+   <tok>
+    <orth>wielkie</orth>
+    <lex><base>wielki</base><ctag>adj</ctag></lex>
+    <ann chan="A">1</ann>
+    <ann chan="B" head="1">2</ann>
+    <ann chan="C" head="1">1</ann>
+   </tok>
+   <tok>
+    <orth>włochate</orth>
+    <lex><base>włochaty</base><ctag>adj</ctag></lex>
+    <ann chan="A">1</ann>
+    <ann chan="B">2</ann>
+    <ann chan="C">1</ann>
+   </tok>
+   <tok>
+    <orth>zapchlone</orth>
+    <lex><base>zapchlić</base><ctag>adj</ctag></lex>
+    <ann chan="A">1</ann>
+    <ann chan="B">2</ann>
+    <ann chan="C">1</ann>
+   </tok>
+   <tok>
+    <orth>koty</orth>
+    <lex><base>kot</base><ctag>noun</ctag></lex>
+    <ann chan="A" head="1">1</ann>
+    <ann chan="B" head="1">3</ann>
+    <ann chan="C">0</ann>
+   </tok>
+   <tok>
+    <orth>zjadły</orth>
+    <lex><base>zjeść</base><ctag>verb</ctag></lex>
+    <ann chan="A">0</ann>
+    <ann chan="B" head="1">4</ann>
+    <ann chan="C">0</ann>
+   </tok>
+   <tok>
+    <orth>pięć</orth>
+    <lex><base>pięć</base><ctag>other</ctag></lex>
+    <ann chan="A" head="1">2</ann>
+    <ann chan="B">4</ann>
+    <ann chan="C">0</ann>
+   </tok>
+   <tok>
+    <orth>tłustych</orth>
+    <lex><base>tłusty</base><ctag>adj</ctag></lex>
+    <ann chan="A">2</ann>
+    <ann chan="B">4</ann>
+    <ann chan="C">0</ann>
+   </tok>
+   <tok>
+    <orth>soczystych</orth>
+    <lex><base>soczysty</base><ctag>adj</ctag></lex>
+    <ann chan="A">2</ann>
+    <ann chan="B">4</ann>
+    <ann chan="C">0</ann>
+   </tok>
+   <tok>
+    <orth>much</orth>
+    <lex><base>mucha</base><ctag>noun</ctag></lex>
+    <ann chan="A">2</ann>
+    <ann chan="B">0</ann>
+    <ann chan="C">0</ann>
+   </tok>
+  </sentence>
+ </chunk>
+</chunkList>
+</cesAna>
-- 
GitLab