Browse Source

add test for starting as OTP application

Will 14 years ago
parent
commit
fd65f3fcdd
2 changed files with 5 additions and 1 deletions
  1. 1 1
      Makefile
  2. 4 0
      test_src/pgsql_tests.erl

+ 1 - 1
Makefile

@@ -29,7 +29,7 @@ clean:
 	@rm -f ebin/*.{beam,app}
 	@rm -f ebin/*.{beam,app}
 	@rm -rf $(NAME)-$(VERSION) $(NAME)-*.tar.gz
 	@rm -rf $(NAME)-$(VERSION) $(NAME)-*.tar.gz
 
 
-test: $(TESTS:test_src/%.erl=test_ebin/%.beam) $(BEAMS)
+test: $(TESTS:test_src/%.erl=test_ebin/%.beam) compile
 	@dialyzer -n --src -c src
 	@dialyzer -n --src -c src
 	$(ERL) -pa ebin/ -pa test_ebin/ -noshell -s pgsql_tests run_tests -s init stop
 	$(ERL) -pa ebin/ -pa test_ebin/ -noshell -s pgsql_tests run_tests -s init stop
 
 

+ 4 - 0
test_src/pgsql_tests.erl

@@ -525,6 +525,10 @@ listen_notify_payload_test() ->
       end,
       end,
       [{async, self()}]).
       [{async, self()}]).
 
 
+application_test() ->
+    lists:foreach(fun application:start/1, [crypto, ssl]),
+    ok = application:start(epgsql).
+
 %% -- run all tests --
 %% -- run all tests --
 
 
 run_tests() ->
 run_tests() ->