From ea066afe76802fb888abc58c1a4ac3d367e2379c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Sat, 24 Nov 2018 12:01:23 +0100 Subject: Error out on dash characters during bootstrap --- test/plugin_bootstrap.mk | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'test/plugin_bootstrap.mk') diff --git a/test/plugin_bootstrap.mk b/test/plugin_bootstrap.mk index 94d5f7c..c253dd6 100644 --- a/test/plugin_bootstrap.mk +++ b/test/plugin_bootstrap.mk @@ -37,6 +37,40 @@ endif {module, $(APP)_sup} = code:load_file($(APP)_sup), \ halt()" +bootstrap-invalid-app-name: 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 + + $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 + + $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: 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)" -- cgit v1.2.3