Skip to content

Commit 2a1a7ec

Browse files
committed
Test record style record declarations
1 parent 91daa88 commit 2a1a7ec

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

lib/stdlib/test/erl_expand_records_SUITE.erl

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,8 @@ otp_7078(Config) when is_list(Config) ->
719719
run(Config, Ts, [strict_record_tests]),
720720
ok.
721721

722-
%% PR-7873. Reserved words and variable names as record names
722+
%% PR-7873. Reserved words and variable names as record names,
723+
%% and record style record declarations
723724
pr_7873(Config) when is_list(Config) ->
724725
Words = [
725726
<<"Abc">>,
@@ -758,7 +759,15 @@ pr_7873(Config) when is_list(Config) ->
758759
[~"-record('WORD', {a = 1}).",
759760
~"-record('WORD', {a = 1 :: integer()}).",
760761
~"-record 'WORD', {a = 1}.",
761-
~"-record 'WORD', {a = 1 :: integer()}."],
762+
~"-record 'WORD', {a = 1 :: integer()}.",
763+
~"-record(#WORD{a = 1}).",
764+
~"-record(#WORD{a = 1 :: integer()}).",
765+
~"-record #WORD{a = 1}.",
766+
~"-record #WORD{a = 1 :: integer()}.",
767+
~"-record # WORD{a = 1}.",
768+
~"-record #WORD {a = 1}.",
769+
~"-record # WORD {a = 1}.",
770+
~"-record #'WORD'{a = 1}."],
762771

763772
Code =
764773
~"""

0 commit comments

Comments
 (0)