[gnumeric] Tests: even better description test.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Tests: even better description test.
- Date: Tue, 11 Jan 2011 22:05:58 +0000 (UTC)
commit 5915307ad7bcd579a1dff41c1880f95892e38d09
Author: Morten Welinder <terra gnome org>
Date: Tue Jan 11 17:05:36 2011 -0500
Tests: even better description test.
ChangeLog | 4 ++--
src/func.c | 9 +++++++--
2 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 101f81b..e4b76b7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,7 @@
2011-01-11 Morten Welinder <terra gnome org>
- * src/func.c (gnm_func_sanity_check1): Allow for _ in function
- names.
+ * src/func.c (gnm_func_sanity_check1): Allow for "_", ".", and
+ digits in function names.
2011-01-10 Andreas J. Guelzow <aguelzow pyrshep ca>
diff --git a/src/func.c b/src/func.c
index 3fc0217..6405433 100644
--- a/src/func.c
+++ b/src/func.c
@@ -659,9 +659,14 @@ gnm_func_sanity_check1 (GnmFunc const *fd)
}
p = h->text;
- while (*p && (*p == '_' || g_ascii_isupper (*p)))
+ while (g_ascii_isupper (*p) ||
+ (p != h->text && (*p == '_' ||
+ *p == '.' ||
+ g_ascii_isdigit (*p))))
p++;
- if (*p == ' ' && p - h->text >= 2) {
+ if (*p == ' ' &&
+ p - h->text >= 2 &&
+ strncmp (h->text, "CP1252", 6) != 0) {
if (g_ascii_strncasecmp (h->text, fd->name, nlen)) {
g_printerr ("%s: Wrong function name in description\n",
fd->name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]