aboutsummaryrefslogtreecommitdiffstats
path: root/test/plugin_bootstrap.mk
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-11-24 13:29:23 +0100
committerLoïc Hoguin <[email protected]>2018-11-24 13:29:23 +0100
commit9dfa5dd6fa860040b2711f09aed38d3a1ff606be (patch)
tree52b69c7c6d4f4c6a5fd31ad300705b152e2a17d0 /test/plugin_bootstrap.mk
parentea066afe76802fb888abc58c1a4ac3d367e2379c (diff)
downloaderlang.mk-9dfa5dd6fa860040b2711f09aed38d3a1ff606be.tar.gz
erlang.mk-9dfa5dd6fa860040b2711f09aed38d3a1ff606be.tar.bz2
erlang.mk-9dfa5dd6fa860040b2711f09aed38d3a1ff606be.zip
Disallow uppercase characters in application names
Diffstat (limited to 'test/plugin_bootstrap.mk')
-rw-r--r--test/plugin_bootstrap.mk42
1 files changed, 38 insertions, 4 deletions
diff --git a/test/plugin_bootstrap.mk b/test/plugin_bootstrap.mk
index c253dd6..8692609 100644
--- a/test/plugin_bootstrap.mk
+++ b/test/plugin_bootstrap.mk
@@ -37,21 +37,35 @@ endif
{module, $(APP)_sup} = code:load_file($(APP)_sup), \
halt()"
-bootstrap-invalid-app-name: build clean
+bootstrap-invalid-app-name-dash: build clean
$i "Try to bootstrap a new OTP application named test_$@"
$t mkdir test_$@/
$t cp ../erlang.mk test_$@/
$t ! $(MAKE) -C test_$@ -f erlang.mk bootstrap $v
-bootstrap-invalid-lib-name: build clean
+bootstrap-invalid-app-name-uppercase: build clean
+
+ $i "Try to bootstrap a new OTP application named $(APP)_HELLO"
+ $t mkdir $(APP)_HELLO/
+ $t cp ../erlang.mk $(APP)_HELLO/
+ $t ! $(MAKE) -C $(APP)_HELLO -f erlang.mk bootstrap $v
+
+bootstrap-invalid-lib-name-dash: build clean
$i "Try to bootstrap a new OTP library named test_$@"
$t mkdir test_$@/
$t cp ../erlang.mk test_$@/
$t ! $(MAKE) -C test_$@ -f erlang.mk bootstrap-lib $v
-bootstrap-invalid-new-app-name: build clean
+bootstrap-invalid-lib-name-uppercase: build clean
+
+ $i "Try to bootstrap a new OTP library named $(APP)_HELLO"
+ $t mkdir $(APP)_HELLO/
+ $t cp ../erlang.mk $(APP)_HELLO/
+ $t ! $(MAKE) -C $(APP)_HELLO -f erlang.mk bootstrap-lib $v
+
+bootstrap-invalid-new-app-name-dash: build clean
$i "Bootstrap a new OTP library named $(APP)"
$t mkdir $(APP)/
@@ -61,7 +75,17 @@ bootstrap-invalid-new-app-name: build clean
$i "Try to create a new application my-app"
$t ! $(MAKE) -C $(APP) new-app in=my-app $v
-bootstrap-invalid-new-lib-name: build clean
+bootstrap-invalid-new-app-name-uppercase: 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 "Try to create a new application My_app"
+ $t ! $(MAKE) -C $(APP) new-app in=My_app $v
+
+bootstrap-invalid-new-lib-name-dash: build clean
$i "Bootstrap a new OTP library named $(APP)"
$t mkdir $(APP)/
@@ -71,6 +95,16 @@ bootstrap-invalid-new-lib-name: build clean
$i "Try to create a new library my-lib"
$t ! $(MAKE) -C $(APP) new-lib in=my-lib $v
+bootstrap-invalid-new-lib-name-uppercase: 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 "Try to create a new library My_lib"
+ $t ! $(MAKE) -C $(APP) new-lib in=My_lib $v
+
bootstrap-lib: build clean
$i "Bootstrap a new OTP library named $(APP)"