1+ (use-modules
2+ (data code)
3+ (data java)
4+ (data julia)
5+ (data scala)
6+ (data python))
7+
8+ (define (regtest-code )
9+ (regression-test-group
10+ " cpp file suffix" " cpp format"
11+ format-from-suffix :none
12+ (test " *.cpp" " cpp" " cpp" )
13+ (test " *.hh" " hh" " cpp" )
14+ (test " *.hpp" " hpp" " cpp" )
15+ (test " *.cc" " cc" " cpp" )))
16+
17+ (define (regtest-scheme )
18+ (regression-test-group
19+ " scheme file suffix" " scheme format"
20+ format-from-suffix :none
21+ (test " *.scm" " scm" " scheme" )))
22+
23+ (define (regtest-scala )
24+ (regression-test-group
25+ " scala file suffix" " scala format"
26+ format-from-suffix :none
27+ (test " *.scala" " scala" " scala" )))
28+
29+ (define (regtest-java )
30+ (regression-test-group
31+ " java file suffix" " java format"
32+ format-from-suffix :none
33+ (test " *.java" " java" " java" )))
34+
35+ (define (regtest-python )
36+ (regression-test-group
37+ " python file suffix" " python format"
38+ format-from-suffix :none
39+ (test " *.py" " py" " python" )))
40+
41+ (define (regtest-format? )
42+ (regression-test-group
43+ " format?" " boolean"
44+ format? :none
45+ (test " python format" " python" #t )
46+ (test " scala format" " scala" #t )
47+ (test " no such format" " no-such-format" #f )))
48+
49+ (define (regtest-format-get-name )
50+ (regression-test-group
51+ " format-get-name" " string"
52+ format-get-name :none
53+ (test " python format" " python" " Python source code" )
54+ (test " scala format" " scala" " Scala source code" )
55+ (test " no such format" " no-such-format" #f )))
56+
57+ (define (regtest-format-from-suffix )
58+ (regression-test-group
59+ " format-from-suffix" " string"
60+ format-from-suffix :none
61+ (test " scheme format" " scm" " scheme" )
62+ (test " python format" " py" " python" )
63+ (test " java format" " java" " java" )
64+ (test " scala format" " scala" " scala" )
65+ (test " julia format" " jl" " julia" )
66+ (test " cpp format" " cpp" " cpp" )
67+ (test " cpp format" " hpp" " cpp" )
68+ (test " cpp format" " cc" " cpp" )
69+ (test " cpp format" " hh" " cpp" )
70+ (test " texmacs format" " tm" " texmacs" )
71+ (test " texmacs format" " ts" " texmacs" )
72+ (test " texmacs format" " stm" " stm" )
73+ (test " png format" " png" " png" )
74+ (test " no such format" " no-such-format" " generic" )))
75+
76+ (tm-define (test_70_7)
77+ (let ((n (+ (regtest-code)
78+ (regtest-java)
79+ (regtest-python)
80+ (regtest-scala)
81+ (regtest-scheme)
82+ (regtest-format?)
83+ (regtest-format-get-name)
84+ (regtest-format-from-suffix))))
85+ (display* " Total: " (object->string n) " tests.\n " )
86+ (display " Test suite of 70_7: ok\n " )))
87+
88+ (tm-define (regtest-tm-convert)
89+ (test_70_7))
0 commit comments