diff --git a/tests/rules-data/relabel-enc/enc.ccl b/tests/rules-data/relabel-enc/enc.ccl
new file mode 100644
index 0000000000000000000000000000000000000000..68687308d51a169e43084172a340a65f32c72417
--- /dev/null
+++ b/tests/rules-data/relabel-enc/enc.ccl
@@ -0,0 +1,7 @@
+rules(
+	rule("enc_suger",
+		in({ger,subst}, class[0]),
+		relabel({ger}, equal(class[0], {subst}))
+	)
+)
+
diff --git a/tests/rules-data/relabel-enc/enc.out.xml b/tests/rules-data/relabel-enc/enc.out.xml
new file mode 100644
index 0000000000000000000000000000000000000000..423eb6b04dbb054efd45378e5cc90b36548f7fe3
--- /dev/null
+++ b/tests/rules-data/relabel-enc/enc.out.xml
@@ -0,0 +1,43 @@
+<?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>
+  <chunk type="s">
+   <tok>
+    <orth>Jedzenie</orth>
+    <lex><base>jedzenie</base><ctag>ger:sg:acc:n</ctag></lex>
+    <lex><base>jedzenie</base><ctag>ger:sg:nom:n</ctag></lex>
+    <lex><base>jedzenie</base><ctag>ger:sg:voc:n</ctag></lex>
+    <lex><base>jeść</base><ctag>ger:sg:acc:n:imperf:aff</ctag></lex>
+    <lex><base>jeść</base><ctag>ger:sg:nom:n:imperf:aff</ctag></lex>
+    <lex><base>jeść</base><ctag>ger:sg:voc:n:imperf:aff</ctag></lex>
+   </tok>
+   <ns/>
+   <tok>
+    <orth>,</orth>
+    <lex><base>,</base><ctag>interp</ctag></lex>
+   </tok>
+   <tok>
+    <orth>siedzenie</orth>
+    <lex><base>siedzenie</base><ctag>ger:sg:acc:n</ctag></lex>
+    <lex><base>siedzenie</base><ctag>ger:sg:nom:n</ctag></lex>
+    <lex><base>siedzenie</base><ctag>ger:sg:voc:n</ctag></lex>
+    <lex><base>siedzieć</base><ctag>ger:sg:acc:n:imperf:aff</ctag></lex>
+    <lex><base>siedzieć</base><ctag>ger:sg:nom:n:imperf:aff</ctag></lex>
+    <lex><base>siedzieć</base><ctag>ger:sg:voc:n:imperf:aff</ctag></lex>
+   </tok>
+   <tok>
+    <orth>i</orth>
+    <lex><base>i</base><ctag>conj</ctag></lex>
+   </tok>
+   <tok>
+    <orth>drzewo</orth>
+    <lex><base>drzewo</base><ctag>subst:sg:acc:n</ctag></lex>
+    <lex><base>drzewo</base><ctag>subst:sg:nom:n</ctag></lex>
+    <lex><base>drzewo</base><ctag>subst:sg:voc:n</ctag></lex>
+   </tok>
+  </chunk>
+ </chunk>
+</chunkList>
+</cesAna>
diff --git a/tests/rules-data/relabel-enc/suger.xml b/tests/rules-data/relabel-enc/suger.xml
new file mode 100644
index 0000000000000000000000000000000000000000..84a471bbfdef6b7d3274100f37743de2dd15e6d9
--- /dev/null
+++ b/tests/rules-data/relabel-enc/suger.xml
@@ -0,0 +1,43 @@
+<?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>
+  <chunk type="s">
+   <tok>
+    <orth>Jedzenie</orth>
+    <lex><base>jedzenie</base><ctag>subst:sg:acc:n</ctag></lex>
+    <lex><base>jedzenie</base><ctag>subst:sg:nom:n</ctag></lex>
+    <lex><base>jedzenie</base><ctag>subst:sg:voc:n</ctag></lex>
+    <lex><base>jeść</base><ctag>ger:sg:acc:n:imperf:aff</ctag></lex>
+    <lex><base>jeść</base><ctag>ger:sg:nom:n:imperf:aff</ctag></lex>
+    <lex><base>jeść</base><ctag>ger:sg:voc:n:imperf:aff</ctag></lex>
+   </tok>
+   <ns/>
+   <tok>
+    <orth>,</orth>
+    <lex><base>,</base><ctag>interp</ctag></lex>
+   </tok>
+   <tok>
+    <orth>siedzenie</orth>
+    <lex><base>siedzenie</base><ctag>subst:sg:acc:n</ctag></lex>
+    <lex><base>siedzenie</base><ctag>subst:sg:nom:n</ctag></lex>
+    <lex><base>siedzenie</base><ctag>subst:sg:voc:n</ctag></lex>
+    <lex><base>siedzieć</base><ctag>ger:sg:acc:n:imperf:aff</ctag></lex>
+    <lex><base>siedzieć</base><ctag>ger:sg:nom:n:imperf:aff</ctag></lex>
+    <lex><base>siedzieć</base><ctag>ger:sg:voc:n:imperf:aff</ctag></lex>
+   </tok>
+   <tok>
+    <orth>i</orth>
+    <lex><base>i</base><ctag>conj</ctag></lex>
+   </tok>
+   <tok>
+    <orth>drzewo</orth>
+    <lex><base>drzewo</base><ctag>subst:sg:acc:n</ctag></lex>
+    <lex><base>drzewo</base><ctag>subst:sg:nom:n</ctag></lex>
+    <lex><base>drzewo</base><ctag>subst:sg:voc:n</ctag></lex>
+   </tok>
+  </chunk>
+ </chunk>
+</chunkList>
+</cesAna>
diff --git a/tests/rules-data/unify2/agr.ccl b/tests/rules-data/unify2/agr.ccl
new file mode 100644
index 0000000000000000000000000000000000000000..d0eb115e870f4d6379e49fb4861444b51dfa6c19
--- /dev/null
+++ b/tests/rules-data/unify2/agr.ccl
@@ -0,0 +1,5 @@
+rules(
+	rule("agr3",
+		unify(0, 2, {nmb, gnd, cas})
+	)
+)
diff --git a/tests/rules-data/unify2/agr.out.xml b/tests/rules-data/unify2/agr.out.xml
new file mode 100644
index 0000000000000000000000000000000000000000..b697447b548aeaae099d87817726442d9cab80cb
--- /dev/null
+++ b/tests/rules-data/unify2/agr.out.xml
@@ -0,0 +1,34 @@
+<?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>
+  <chunk type="s">
+   <tok>
+    <orth>nie</orth>
+    <lex><base>nie</base><ctag>qub</ctag></lex>
+    <lex><base>on</base><ctag>ppron3:sg:acc:n:ter:praep</ctag></lex>
+   </tok>
+   <tok>
+    <orth>czujÄ™</orth>
+    <lex><base>czuć</base><ctag>fin:sg:pri:imperf</ctag></lex>
+   </tok>
+   <tok>
+    <orth>już</orth>
+    <lex><base>już</base><ctag>qub</ctag></lex>
+   </tok>
+   <tok>
+    <orth>całym</orth>
+   <lex><base>cały</base><ctag>adj:sg:inst:m1:pos</ctag></lex>
+    <lex><base>cały</base><ctag>adj:sg:inst:m2:pos</ctag></lex>
+    <lex><base>cały</base><ctag>adj:sg:inst:m3:pos</ctag></lex>
+    <lex><base>cały</base><ctag>adj:sg:inst:n:pos</ctag></lex>
+  </tok>
+   <tok>
+    <orth>sobÄ…</orth>
+    <lex><base>siÄ™</base><ctag>siebie:inst</ctag></lex>
+   </tok>
+  </chunk>
+ </chunk>
+</chunkList>
+</cesAna>
diff --git a/tests/rules-data/unify2/in.xml b/tests/rules-data/unify2/in.xml
new file mode 100644
index 0000000000000000000000000000000000000000..4103c664d4580fb598d4a91f1af2993afbd0cc3e
--- /dev/null
+++ b/tests/rules-data/unify2/in.xml
@@ -0,0 +1,47 @@
+<?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>
+  <chunk type="s">
+   <tok>
+    <orth>nie</orth>
+    <lex><base>nie</base><ctag>qub</ctag></lex>
+    <lex><base>on</base><ctag>ppron3:pl:acc:f:ter:praep</ctag></lex>
+    <lex><base>on</base><ctag>ppron3:pl:acc:m2:ter:praep</ctag></lex>
+    <lex><base>on</base><ctag>ppron3:pl:acc:m3:ter:praep</ctag></lex>
+    <lex><base>on</base><ctag>ppron3:pl:acc:n:ter:praep</ctag></lex>
+    <lex><base>on</base><ctag>ppron3:sg:acc:n:ter:praep</ctag></lex>
+   </tok>
+   <tok>
+    <orth>czujÄ™</orth>
+    <lex><base>czuć</base><ctag>fin:sg:pri:imperf</ctag></lex>
+   </tok>
+   <tok>
+    <orth>już</orth>
+    <lex><base>już</base><ctag>qub</ctag></lex>
+   </tok>
+   <tok>
+    <orth>całym</orth>
+    <lex><base>cały</base><ctag>adj:pl:dat:f:pos</ctag></lex>
+    <lex><base>cały</base><ctag>adj:pl:dat:m1:pos</ctag></lex>
+    <lex><base>cały</base><ctag>adj:pl:dat:m2:pos</ctag></lex>
+    <lex><base>cały</base><ctag>adj:pl:dat:m3:pos</ctag></lex>
+    <lex><base>cały</base><ctag>adj:pl:dat:n:pos</ctag></lex>
+    <lex><base>cały</base><ctag>adj:sg:inst:m1:pos</ctag></lex>
+    <lex><base>cały</base><ctag>adj:sg:inst:m2:pos</ctag></lex>
+    <lex><base>cały</base><ctag>adj:sg:inst:m3:pos</ctag></lex>
+    <lex><base>cały</base><ctag>adj:sg:inst:n:pos</ctag></lex>
+    <lex><base>cały</base><ctag>adj:sg:loc:m1:pos</ctag></lex>
+    <lex><base>cały</base><ctag>adj:sg:loc:m2:pos</ctag></lex>
+    <lex><base>cały</base><ctag>adj:sg:loc:m3:pos</ctag></lex>
+    <lex><base>cały</base><ctag>adj:sg:loc:n:pos</ctag></lex>
+   </tok>
+   <tok>
+    <orth>sobÄ…</orth>
+    <lex><base>siÄ™</base><ctag>siebie:inst</ctag></lex>
+   </tok>
+  </chunk>
+ </chunk>
+</chunkList>
+</cesAna>