From 2391a11fc8f43c5af1bd814d3f9749cd4f19c9dc Mon Sep 17 00:00:00 2001 From: Sascha Brawer Date: Mon, 7 Dec 2015 22:53:38 +0100 Subject: [PATCH] [feaLib] Test that the parser rejects `enum pos cursive` constructs --- Lib/fontTools/feaLib/parser_test.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Lib/fontTools/feaLib/parser_test.py b/Lib/fontTools/feaLib/parser_test.py index a9b7ca3cc..d7b70463e 100644 --- a/Lib/fontTools/feaLib/parser_test.py +++ b/Lib/fontTools/feaLib/parser_test.py @@ -433,6 +433,15 @@ class ParserTest(unittest.TestCase): self.assertEqual((pos.entryAnchor.x, pos.entryAnchor.y), (12, -2)) self.assertEqual((pos.exitAnchor.x, pos.exitAnchor.y), (2, 3)) + def test_gpos_type_3_enumerated(self): + self.assertRaisesRegex( + FeatureLibError, + '"enumerate" is not allowed with cursive attachment positioning', + self.parse, + "feature kern {" + " enumerate position cursive A ;" + "} kern;") + def test_rsub_format_a(self): doc = self.parse("feature test {rsub a [b B] c' d [e E] by C;} test;") rsub = doc.statements[0].statements[0]