From cf72119ea1b76a8650503a8ca2b1e025e9c7b700 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Fri, 14 Feb 2014 13:02:26 +0100 Subject: Correct parenthesis expansion Commit dfb4ec804a099b539c91e5643090d8183885e71c attempted to add a closing parenthesis to the expansion of a funtion of zero arity if there were no other functions with the same name. Unfortunately it would add the closing parenthesis in many cases when there was another function with another name (e.g. to Mod:module_info/0 even though there is a Mod:module_info/1). Correct logic for adding parenthesis and add a test case. --- lib/stdlib/test/edlin_expand_SUITE.erl | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/stdlib/test/edlin_expand_SUITE.erl') diff --git a/lib/stdlib/test/edlin_expand_SUITE.erl b/lib/stdlib/test/edlin_expand_SUITE.erl index 8709d18414..43c980e994 100644 --- a/lib/stdlib/test/edlin_expand_SUITE.erl +++ b/lib/stdlib/test/edlin_expand_SUITE.erl @@ -114,6 +114,10 @@ quoted_fun(Config) when is_list(Config) -> [{"'Quoted_fun_name'",0}, {"'Quoted_fun_too'",0}]} = do_expand("expand_test1:'Quoted_fun_"), {yes,"weird-fun-name'(",[]} = do_expand("expand_test1:'#"), + + %% Since there is a module_info/1 as well as a module_info/0 + %% there should not be a closing parenthesis added. + {yes,"(",[]} = do_expand("expand_test:module_info"), ok. quoted_module(doc) -> -- cgit v1.2.3