Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/cygwin-apps/calm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2023-02-12 15:36:57 +0300
committerJon Turney <jon.turney@dronecode.org.uk>2023-02-19 20:03:09 +0300
commit55d44e25c32ada23cebf5ed77ea013030d0dc490 (patch)
tree4eeea6ea0e623cc4fa205292ddaf03d750feabc6
parent4efd27f70df3bf107bf7ad9b80e407f98da6f862 (diff)
Improve hint parser error for embedded double quote
-rwxr-xr-xcalm/hint.py2
-rw-r--r--test/testdata/hints/x86_64/release/libtextcat/libtextcat-2.2-2-src.expected2
-rw-r--r--test/testdata/hints/x86_64/release/libtextcat/libtextcat-2.2-2.expected2
-rw-r--r--test/testdata/hints/x86_64/release/libtextcat/libtextcat-devel/libtextcat-devel-2.2-2.expected2
-rw-r--r--test/testdata/hints/x86_64/release/libtextcat/libtextcat0/libtextcat0-2.2-2.expected2
-rw-r--r--test/testdata/hints/x86_64/release/proj/libproj-devel/libproj-devel-4.8.0-1.expected3
-rw-r--r--test/testdata/hints/x86_64/release/proj/libproj1/libproj1-4.8.0-1.expected3
-rw-r--r--test/testdata/hints/x86_64/release/proj/proj-4.8.0-1.expected3
8 files changed, 11 insertions, 8 deletions
diff --git a/calm/hint.py b/calm/hint.py
index 28a81b0..71fa7b9 100755
--- a/calm/hint.py
+++ b/calm/hint.py
@@ -232,7 +232,7 @@ def hint_file_parse(fn, kind, strict=False):
errors.append('%s at line %d' % (error, i))
if (item.count('"') != 0) and (item.count('"') != 2):
- errors.append('embedded quote at line %d' % (i))
+ errors.append('double-quote within double-quotes at line %d (hint files have no escape character)' % (i))
# key:value
match = re.match(r'^([^:\s]+):\s*(.*)$', item, re.DOTALL)
diff --git a/test/testdata/hints/x86_64/release/libtextcat/libtextcat-2.2-2-src.expected b/test/testdata/hints/x86_64/release/libtextcat/libtextcat-2.2-2-src.expected
index 4a76a30..d8d5310 100644
--- a/test/testdata/hints/x86_64/release/libtextcat/libtextcat-2.2-2-src.expected
+++ b/test/testdata/hints/x86_64/release/libtextcat/libtextcat-2.2-2-src.expected
@@ -7,4 +7,4 @@
'BSD License.\n'
'http://software.wise-guys.nl/libtextcat/"',
'category': 'Text',
- 'parse-errors': ['embedded quote at line 7']}
+ 'parse-errors': ['double-quote within double-quotes at line 7 (hint files have no escape character)']}
diff --git a/test/testdata/hints/x86_64/release/libtextcat/libtextcat-2.2-2.expected b/test/testdata/hints/x86_64/release/libtextcat/libtextcat-2.2-2.expected
index 498e7e5..7fb8dd8 100644
--- a/test/testdata/hints/x86_64/release/libtextcat/libtextcat-2.2-2.expected
+++ b/test/testdata/hints/x86_64/release/libtextcat/libtextcat-2.2-2.expected
@@ -8,4 +8,4 @@
'http://software.wise-guys.nl/libtextcat/"',
'category': 'Text',
'requires': 'libtextcat0',
- 'parse-errors': ['embedded quote at line 7']}
+ 'parse-errors': ['double-quote within double-quotes at line 7 (hint files have no escape character)']}
diff --git a/test/testdata/hints/x86_64/release/libtextcat/libtextcat-devel/libtextcat-devel-2.2-2.expected b/test/testdata/hints/x86_64/release/libtextcat/libtextcat-devel/libtextcat-devel-2.2-2.expected
index f60d34d..a038cd8 100644
--- a/test/testdata/hints/x86_64/release/libtextcat/libtextcat-devel/libtextcat-devel-2.2-2.expected
+++ b/test/testdata/hints/x86_64/release/libtextcat/libtextcat-devel/libtextcat-devel-2.2-2.expected
@@ -9,4 +9,4 @@
'category': 'Devel Text',
'requires': 'libtextcat0 libtextcat',
'external-source': 'libtextcat',
- 'parse-errors': ['embedded quote at line 7']}
+ 'parse-errors': ['double-quote within double-quotes at line 7 (hint files have no escape character)']}
diff --git a/test/testdata/hints/x86_64/release/libtextcat/libtextcat0/libtextcat0-2.2-2.expected b/test/testdata/hints/x86_64/release/libtextcat/libtextcat0/libtextcat0-2.2-2.expected
index 7f186d6..12d0872 100644
--- a/test/testdata/hints/x86_64/release/libtextcat/libtextcat0/libtextcat0-2.2-2.expected
+++ b/test/testdata/hints/x86_64/release/libtextcat/libtextcat0/libtextcat0-2.2-2.expected
@@ -9,4 +9,4 @@
'category': 'Text',
'requires': 'cygwin',
'external-source': 'libtextcat',
- 'parse-errors': ['embedded quote at line 7']}
+ 'parse-errors': ['double-quote within double-quotes at line 7 (hint files have no escape character)']}
diff --git a/test/testdata/hints/x86_64/release/proj/libproj-devel/libproj-devel-4.8.0-1.expected b/test/testdata/hints/x86_64/release/proj/libproj-devel/libproj-devel-4.8.0-1.expected
index 620f019..5c3d624 100644
--- a/test/testdata/hints/x86_64/release/proj/libproj-devel/libproj-devel-4.8.0-1.expected
+++ b/test/testdata/hints/x86_64/release/proj/libproj-devel/libproj-devel-4.8.0-1.expected
@@ -3,4 +3,5 @@
'sdesc': '""The PROJ Cartographic Projections Software (devel)"\n'
'ldesc: "Cartographic projection library and utilities"',
'external-source': 'proj',
- 'parse-errors': ['embedded quote at line 3', 'key sdesc has multi-line value']}
+ 'parse-errors': ['double-quote within double-quotes at line 3 (hint files have no escape character)',
+ 'key sdesc has multi-line value']}
diff --git a/test/testdata/hints/x86_64/release/proj/libproj1/libproj1-4.8.0-1.expected b/test/testdata/hints/x86_64/release/proj/libproj1/libproj1-4.8.0-1.expected
index cc05b73..b7487fe 100644
--- a/test/testdata/hints/x86_64/release/proj/libproj1/libproj1-4.8.0-1.expected
+++ b/test/testdata/hints/x86_64/release/proj/libproj1/libproj1-4.8.0-1.expected
@@ -3,4 +3,5 @@
'sdesc': '""The PROJ Cartographic Projections Software (runtime)"\n'
'ldesc: "Cartographic projection library and utilities"',
'external-source': 'proj',
- 'parse-errors': ['embedded quote at line 3', 'key sdesc has multi-line value']}
+ 'parse-errors': ['double-quote within double-quotes at line 3 (hint files have no escape character)',
+ 'key sdesc has multi-line value']}
diff --git a/test/testdata/hints/x86_64/release/proj/proj-4.8.0-1.expected b/test/testdata/hints/x86_64/release/proj/proj-4.8.0-1.expected
index 40db455..f43b179 100644
--- a/test/testdata/hints/x86_64/release/proj/proj-4.8.0-1.expected
+++ b/test/testdata/hints/x86_64/release/proj/proj-4.8.0-1.expected
@@ -2,4 +2,5 @@
'requires': 'libproj1',
'sdesc': '""The PROJ Cartographic Projections Software (utilities)"\n'
'ldesc: "Cartographic projection library and utilities"',
- 'parse-errors': ['embedded quote at line 3', 'key sdesc has multi-line value']}
+ 'parse-errors': ['double-quote within double-quotes at line 3 (hint files have no escape character)',
+ 'key sdesc has multi-line value']}