Clarify auto-comment test.
[erlware-mode.git] / test.erl
blob19068d8f2b8f2054c030c634736728cbcf07d20b
1 %% This file contains Erlang code for testing the
2 %% Erlware emacs mode. It contains functions that
3 %% use different corner cases to make sure the mode
4 %% does the right thing.
5 %%
6 %% <<If comment-multi-line is on, Press Return to get another %% line>>
8 -module(test.erl).
10 func1() ->
11 % This line should stay here after a tab.
12 % If the comment-multi-line variable is non-nil, then pressing
13 % Return at end of this line shouldto get another % line.
14 ok.
16 func2() ->
17 % Pressing tabs on all lines should not change indents.
18 {1, $(},
19 {2, $)},
20 {3, $>},
21 {4, $<},
22 {5, $,},
23 [$% | ["should not be highlighted as a comment"]],
24 ok.
26 func3() ->
27 % If you edit the font lock mode to underline function names,
28 % there should not be an underline character after the '->'.
29 fun() -> ok end.
31 func4() ->
32 try
33 module:somefun(monkey, horse)
34 catch
35 % both these clauses should maintain their indents after tab presses
36 error:something ->
37 error;
38 error:function_clause ->
39 error
40 end.
42 func5(X)
43 when is_atom(X) ->
44 % 'is_atom' should be highlighted as a guard above
46 % All functions below should be highlighted as functions, not
47 % as guards or bifs. So each entire function name should be
48 % highlighted in the same way.
49 f:is_atom(),
50 g:registered(),
51 h:my_registered(),
53 % This should be highlighted as a bif.
54 registered(),
56 % Should be highlighted as a function.
57 deregistered().