aboutsummaryrefslogtreecommitdiffstats
path: root/test/core_app.mk
diff options
context:
space:
mode:
authornevar <[email protected]>2016-08-08 14:23:16 +0700
committerLoïc Hoguin <[email protected]>2016-10-19 18:23:10 +0200
commitda05859f4bef76b8b933c65ee764c48a97b4baf5 (patch)
treeea47f4c393606ada8066f430d4d002468bb4c3c7 /test/core_app.mk
parentfc7f6acd00331b09217fe733b89c620771fdabd5 (diff)
downloaderlang.mk-da05859f4bef76b8b933c65ee764c48a97b4baf5.tar.gz
erlang.mk-da05859f4bef76b8b933c65ee764c48a97b4baf5.tar.bz2
erlang.mk-da05859f4bef76b8b933c65ee764c48a97b4baf5.zip
Escape % in app_file template
Diffstat (limited to 'test/core_app.mk')
-rw-r--r--test/core_app.mk23
1 files changed, 22 insertions, 1 deletions
diff --git a/test/core_app.mk b/test/core_app.mk
index e568947..0276390 100644
--- a/test/core_app.mk
+++ b/test/core_app.mk
@@ -1,6 +1,6 @@
# Core: Building applications.
-CORE_APP_CASES = appsrc-change asn1 auto-git-id env erlc-exclude erlc-opts erlc-opts-filter error generate-erl generate-erl-include generate-erl-prepend hrl hrl-recursive makefile-change mib no-app no-makedep project-mod pt pt-erlc-opts xrl xrl-include yrl yrl-header yrl-include
+CORE_APP_CASES = appsrc-change asn1 auto-git-id env erlc-exclude erlc-opts erlc-opts-filter error generate-erl generate-erl-include generate-erl-prepend hrl hrl-recursive makefile-change mib name-special-char no-app no-makedep project-mod pt pt-erlc-opts xrl xrl-include yrl yrl-header yrl-include
CORE_APP_TARGETS = $(addprefix core-app-,$(CORE_APP_CASES))
.PHONY: core-app $(CORE_APP_TARGETS)
@@ -920,6 +920,27 @@ endif
[{module, M} = code:load_file(M) || M <- Mods], \
halt()"
+ifndef LEGACY
+core-app-name-special-char: build clean
+
+ $i "Bootstrap a new OTP library named $(APP)"
+ $t mkdir $(APP)/
+ $t cp ../erlang.mk $(APP)/
+ $t $(MAKE) -C $(APP) -f erlang.mk bootstrap-lib $v
+
+ $i "Set PROJECT_DESCRIPTION = test % in the Makefile"
+ $t echo "PROJECT_DESCRIPTION = test %" >> $(APP)/Makefile
+
+ $i "Build the application"
+ $t $(MAKE) -C $(APP) $v
+
+ $i "Check that the application was compiled correctly"
+ $t $(ERL) -pa $(APP)/ebin/ -eval " \
+ ok = application:load($(APP)), \
+ {ok,\"test %\"} = application:get_key($(APP), description), \
+ halt()"
+endif
+
core-app-no-app: build clean
$i "Bootstrap a project without an OTP library"