aboutsummaryrefslogtreecommitdiffstats
path: root/lib/parsetools/test/yecc_SUITE.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2010-11-01 14:29:21 +0100
committerHans Bolinder <[email protected]>2010-11-01 14:29:21 +0100
commit94ffa8407566de48f55036ce705924d7ee111d25 (patch)
treeed5a43ad408f5dbda20f9902992f9e39224d97be /lib/parsetools/test/yecc_SUITE.erl
parentff182ad7f0b4422f961b4b5336b747cc9f3b2cdf (diff)
downloadotp-94ffa8407566de48f55036ce705924d7ee111d25.tar.gz
otp-94ffa8407566de48f55036ce705924d7ee111d25.tar.bz2
otp-94ffa8407566de48f55036ce705924d7ee111d25.zip
Improve formating of Yecc error messages
The formating of Yecc's error messages has been improved. (Thanks to Joe Armstrong.)
Diffstat (limited to 'lib/parsetools/test/yecc_SUITE.erl')
-rw-r--r--lib/parsetools/test/yecc_SUITE.erl12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/parsetools/test/yecc_SUITE.erl b/lib/parsetools/test/yecc_SUITE.erl
index 93949a074a..8153be7e61 100644
--- a/lib/parsetools/test/yecc_SUITE.erl
+++ b/lib/parsetools/test/yecc_SUITE.erl
@@ -46,7 +46,7 @@
bugs/1,
otp_5369/1, otp_6362/1, otp_7945/1, otp_8483/1, otp_8486/1,
improvements/1,
- otp_7292/1, otp_7969/1]).
+ otp_7292/1, otp_7969/1, otp_8919/1]).
% Default timetrap timeout (set in init_per_testcase).
-define(default_timeout, ?t:minutes(1)).
@@ -1541,7 +1541,7 @@ otp_8486(Config) when is_list(Config) ->
ok.
improvements(suite) ->
- [otp_7292, otp_7969].
+ [otp_7292, otp_7969, otp_8919].
otp_7292(doc) ->
"OTP-7292. Header declarations for edoc.";
@@ -1773,6 +1773,14 @@ otp_7969(Config) when is_list(Config) ->
?line {error,{{1,11},erl_parse,_}} = erl_parse:parse_and_scan({F6, []}),
ok.
+otp_8919(doc) ->
+ "OTP-8919. Improve formating of Yecc error messages.";
+otp_8919(suite) -> [];
+otp_8919(Config) when is_list(Config) ->
+ {error,{1,Mod,Mess}} = erl_parse:parse([{cat,1,"hello"}]),
+ "syntax error before: \"hello\"" = lists:flatten(Mod:format_error(Mess)),
+ ok.
+
yeccpre_size() ->
yeccpre_size(default_yeccpre()).