aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog4
-rw-r--r--test/indent/modula2.mod53
2 files changed, 57 insertions, 0 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index 5a5c202ad3c..3b1921c5987 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,7 @@
12010-11-11 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * indent/modula2.mod: New file.
4
12010-10-27 Stefan Monnier <monnier@iro.umontreal.ca> 52010-10-27 Stefan Monnier <monnier@iro.umontreal.ca>
2 6
3 * indent/octave.m: Add a test to ensure indentation is local. 7 * indent/octave.m: Add a test to ensure indentation is local.
diff --git a/test/indent/modula2.mod b/test/indent/modula2.mod
new file mode 100644
index 00000000000..f8fbcb7f4e5
--- /dev/null
+++ b/test/indent/modula2.mod
@@ -0,0 +1,53 @@
1(* -*- mode: modula-2; m2-indent:3 -*- *)
2
3IMPLEMENTATION MODULE Indent ;
4
5(* This is (* a nested comment *) *)
6// This is a single-line comment.
7
8FROM SYSTEM IMPORT ADR, TSIZE, SIZE, WORD ;
9
10CONST
11 c1 = 2;
12
13TYPE
14 t = POINTER TO ARRAY [0..10] OF LONGINT;
15
16VAR x: t;
17 y:LONGINT;
18
19
20PROCEDURE f1 (f: File) : INTEGER ;
21 VAR
22 fd: FileDescriptor ;
23 PROCEDURE foo (a:CARDINAL) : INTEGER;
24 BEGIN
25 END foo;
26BEGIN
27 IF f#Error
28 THEN
29 fd := GetIndice(FileInfo, f) ;
30 IF fd#NIL THEN
31 RETURN( fd^.unixfd )
32 ELSE
33 CASE z OF
34 1: do1();
35 | 2: do2();
36 toto(x);
37 | 3: ;
38 | 4: do4();
39 ELSE do5();
40 END ; (* CASE selection *)
41
42 END
43 END ;
44 FormatError1('file %d has not been opened or is out of range\n', f) ;
45 RETURN( -1 )
46END f1 ;
47
48
49BEGIN
50 init
51FINALLY
52 done
53END Indent.