[anjuta] am-project: Add a check for config file list starting with space and fix adding config file



commit 4a28c75a3af9f5eba84184898a01998486edd205
Author: SÃbastien Granjoux <seb sfo free fr>
Date:   Thu Jun 23 22:26:34 2011 +0200

    am-project: Add a check for config file list starting with space and fix adding config file

 plugins/am-project/ac-parser.y    |    4 ++-
 plugins/am-project/tests/group.at |   44 +++++++++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+), 1 deletions(-)
---
diff --git a/plugins/am-project/ac-parser.y b/plugins/am-project/ac-parser.y
index 5fa9f6a..f8d7abd 100644
--- a/plugins/am-project/ac-parser.y
+++ b/plugins/am-project/ac-parser.y
@@ -219,7 +219,9 @@ macro:
 space_list:
     /* empty */
     | space_list_body
-    | space_list_body spaces
+    | space_list_body spaces {
+		anjuta_token_set_type ($2, ANJUTA_TOKEN_LAST);
+	}
     ;
 
 space_list_body:
diff --git a/plugins/am-project/tests/group.at b/plugins/am-project/tests/group.at
index 06cdc3b..f22f87d 100644
--- a/plugins/am-project/tests/group.at
+++ b/plugins/am-project/tests/group.at
@@ -147,4 +147,48 @@ AT_PARSER_CHECK([load empty1 \
 AT_CHECK([diff output expect])
 
 
+
+AS_MKDIR_P([single])
+AT_DATA([single/configure.ac],
+[[AC_CONFIG_FILES(
+Makefile
+)
+]])
+AT_DATA([single/Makefile.am],
+[[
+]])
+
+
+
+AT_DATA([expect],
+[[    GROUP (): single1
+        GROUP (): group1
+]])
+AT_DATA([reference.am],
+[[
+
+SUBDIRS = \
+	group1
+]])
+AT_DATA([reference.ac],
+[[AC_CONFIG_FILES(
+Makefile
+group1/Makefile
+)
+]])
+AT_PARSER_CHECK([load single \
+		 move single1 \
+		 add group 0 group1 \
+		 list \
+		 save])
+AT_CHECK([diff output expect])
+AT_CHECK([diff -b single1/configure.ac reference.ac])
+AT_CHECK([diff -b single1/Makefile.am reference.am])
+AT_CHECK([test -e single1/group1/Makefile.am])
+AT_PARSER_CHECK([load single1 \
+		 list])
+AT_CHECK([diff output expect])
+
+
+
 AT_CLEANUP



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]