[anjuta] am-project: Fix an error when changing quoted properties value in configure.ac
- From: Sebastien Granjoux <sgranjoux src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] am-project: Fix an error when changing quoted properties value in configure.ac
- Date: Sat, 21 Jan 2012 20:58:13 +0000 (UTC)
commit 303aeba1ebdf6fde628ea24525eb6f39b4a1f31e
Author: SÃbastien Granjoux <seb sfo free fr>
Date: Sat Jan 21 21:40:37 2012 +0100
am-project: Fix an error when changing quoted properties value in configure.ac
libanjuta/anjuta-token.c | 4 ++++
plugins/am-project/ac-parser.y | 21 +++++++--------------
plugins/am-project/tests/Makefile.am | 3 ++-
plugins/am-project/tests/anjuta.lst | 9 +++++++--
plugins/am-project/tests/comment.at | 30 ++++++++++++++++++++++++++++++
plugins/am-project/tests/testsuite.at | 1 +
6 files changed, 51 insertions(+), 17 deletions(-)
---
diff --git a/libanjuta/anjuta-token.c b/libanjuta/anjuta-token.c
index 457c0b0..ba7cb69 100644
--- a/libanjuta/anjuta-token.c
+++ b/libanjuta/anjuta-token.c
@@ -1054,6 +1054,10 @@ anjuta_token_merge_own_children (AnjutaToken *group)
AnjutaToken *
anjuta_token_merge_children (AnjutaToken *first, AnjutaToken *end)
{
+ if (first == NULL)
+ {
+ return end;
+ }
if ((first == end) || (end == NULL))
{
return first;
diff --git a/plugins/am-project/ac-parser.y b/plugins/am-project/ac-parser.y
index 84d7e85..ac06d75 100644
--- a/plugins/am-project/ac-parser.y
+++ b/plugins/am-project/ac-parser.y
@@ -675,7 +675,9 @@ arg:
//anjuta_token_dump ($1);
//fprintf(stdout, "arg body\n");
//anjuta_token_dump ($2);
- anjuta_token_merge_children ($1, $2);
+ $$ = anjuta_token_new_static (ANJUTA_TOKEN_ITEM, NULL);
+ anjuta_token_merge ($$, $1);
+ anjuta_token_merge_children ($$, $2);
//fprintf(stdout, "arg merge\n");
//anjuta_token_dump ($1);
}
@@ -686,19 +688,13 @@ arg_body:
$$ = anjuta_token_new_static (ANJUTA_TOKEN_ITEM, NULL);
}
| arg_body arg_part_or_space {
- anjuta_token_merge_children ($1, $2);
+ $$ = anjuta_token_merge ($1, $2);
}
;
arg_part_or_space:
- SPACE {
- $$ = anjuta_token_new_static (ANJUTA_TOKEN_ITEM, NULL);
- anjuta_token_merge ($$, $1);
- }
- | END_OF_LINE {
- $$ = anjuta_token_new_static (ANJUTA_TOKEN_ITEM, NULL);
- anjuta_token_merge ($$, $1);
- }
+ SPACE
+ | END_OF_LINE
| arg_part
;
@@ -706,10 +702,7 @@ arg_part:
arg_string
| expression
| macro
- | arg_token {
- $$ = anjuta_token_new_static (ANJUTA_TOKEN_ITEM, NULL);
- anjuta_token_merge ($$, $1);
- }
+ | arg_token
;
arg_token:
diff --git a/plugins/am-project/tests/Makefile.am b/plugins/am-project/tests/Makefile.am
index 9210af9..1f351da 100644
--- a/plugins/am-project/tests/Makefile.am
+++ b/plugins/am-project/tests/Makefile.am
@@ -34,7 +34,8 @@ TESTSUITE_AT = \
$(srcdir)/data_target.at \
$(srcdir)/bugs.at \
$(srcdir)/nemiver.at \
- $(srcdir)/ltinit.at
+ $(srcdir)/ltinit.at \
+ $(srcdir)/comment.at
TESTSUITE = $(srcdir)/testsuite
diff --git a/plugins/am-project/tests/anjuta.lst b/plugins/am-project/tests/anjuta.lst
index 9cd8652..904fc06 100644
--- a/plugins/am-project/tests/anjuta.lst
+++ b/plugins/am-project/tests/anjuta.lst
@@ -10,6 +10,7 @@ ROOT (): anjuta
PACKAGE (): gthread-2.0
PACKAGE (): glib-2.0
PACKAGE (): gio-2.0
+ PACKAGE (): gmodule-2.0
PACKAGE (): gtk+-3.0
PACKAGE (): gdk-pixbuf-2.0
MODULE (): XML
@@ -31,7 +32,7 @@ ROOT (): anjuta
MODULE (): SOURCEVIEW
PACKAGE (): gtksourceview-3.0
MODULE (): VALA
- PACKAGE (): libvala-0.14
+ PACKAGE (): ${LIBVALA}
MODULE (): PLUGIN_SYMBOL_DB
PACKAGE (): libgda-4.0
MODULE (): PLUGIN_SYMBOL_DB
@@ -190,6 +191,7 @@ ROOT (): anjuta
SOURCE (): libanjuta/interfaces/ianjuta-print.c
SOURCE (): libanjuta/interfaces/ianjuta-project.c
SOURCE (): libanjuta/interfaces/ianjuta-project-backend.c
+ SOURCE (): libanjuta/interfaces/ianjuta-project-chooser.c
SOURCE (): libanjuta/interfaces/ianjuta-project-manager.c
SOURCE (): libanjuta/interfaces/ianjuta-provider.c
SOURCE (): libanjuta/interfaces/ianjuta-snippets-manager.c
@@ -255,6 +257,7 @@ ROOT (): anjuta
SOURCE (): libanjuta/interfaces/ianjuta-print.h
SOURCE (): libanjuta/interfaces/ianjuta-project.h
SOURCE (): libanjuta/interfaces/ianjuta-project-backend.h
+ SOURCE (): libanjuta/interfaces/ianjuta-project-chooser.h
SOURCE (): libanjuta/interfaces/ianjuta-project-manager.h
SOURCE (): libanjuta/interfaces/ianjuta-provider.h
SOURCE (): libanjuta/interfaces/ianjuta-snippets-manager.h
@@ -1457,7 +1460,7 @@ ROOT (): anjuta
SOURCE (): plugins/language-support-vala/$(plugin_in_files:.plugin.in=.plugin)
TARGET (): libanjuta-language-vala.la
PROPERTY (Installation directory): plugindir
- PROPERTY (Vala compiler flags): --vapidir $(srcdir) --pkg $(LIBVALA) --pkg libanjuta-3.0
+ PROPERTY (Vala compiler flags): --vapidir $(srcdir) --pkg libvala${valaver} --pkg libanjuta-3.0
PROPERTY (Linker flags): -module -avoid-version -no-undefined
PROPERTY (Libraries): $(top_builddir)/libanjuta/libanjuta-3.la $(VALA_LIBS)
MODULE (): VALA
@@ -1601,6 +1604,8 @@ ROOT (): anjuta
SOURCE (): plugins/project-manager/project-model.c
SOURCE (): plugins/project-manager/project-view.h
SOURCE (): plugins/project-manager/project-view.c
+ SOURCE (): plugins/project-manager/project-chooser.c
+ SOURCE (): plugins/project-manager/project-chooser.h
SOURCE (): plugins/project-manager/project-util.h
SOURCE (): plugins/project-manager/project-util.c
SOURCE (): plugins/project-manager/project.h
diff --git a/plugins/am-project/tests/comment.at b/plugins/am-project/tests/comment.at
new file mode 100644
index 0000000..3a0e429
--- /dev/null
+++ b/plugins/am-project/tests/comment.at
@@ -0,0 +1,30 @@
+AT_SETUP([Comment in configure.ac])
+
+
+
+AS_MKDIR_P([project1])
+AT_DATA([project1/configure.ac],
+[[
+AC_INIT([Ibl_server],[1.01])
+AC_CONFIG_FILES(Makefile)
+]])
+AT_DATA([project1/Makefile.am],
+[[]])
+AT_DATA([expect],
+[[ROOT (): bug1
+ PROPERTY (Name): Ibl_server
+ PROPERTY (Version): 1.02
+]])
+AT_PARSER_CHECK([load project1 \
+ move bug1 \
+ set 0 version 1.02 \
+ list \
+ save])
+AT_CHECK([diff output expect])
+AT_PARSER_CHECK([load bug1 \
+ list])
+AT_CHECK([diff output expect])
+
+
+
+AT_CLEANUP
diff --git a/plugins/am-project/tests/testsuite.at b/plugins/am-project/tests/testsuite.at
index 0ae2274..f1dc221 100644
--- a/plugins/am-project/tests/testsuite.at
+++ b/plugins/am-project/tests/testsuite.at
@@ -15,3 +15,4 @@ m4_include([data_target.at])
m4_include([bugs.at])
m4_include([nemiver.at])
m4_include([ltinit.at])
+m4_include([comment.at])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]