forked from oscar-system/GAP.jl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhelp.jl
40 lines (33 loc) · 1.25 KB
/
help.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
@testset "help" begin
using REPL
tt = REPL.TerminalMenus.terminal
function test_gap_help(topic::String)
inp = Base.IOBuffer("qq") # exit the menu if applicable
term = REPL.Terminals.TTYTerminal( "dumb", inp, tt.out_stream, tt.err_stream)
return isa(GAP.gap_help_string(topic, false, term), String) &&
isa(GAP.gap_help_string(topic, true, term), String)
end
# Do not print the menus.
REPL.TerminalMenus.config(supress_output = true)
@test test_gap_help("")
@test test_gap_help("&")
@test test_gap_help("-")
@test test_gap_help("+")
@test test_gap_help("<")
@test test_gap_help("<<")
@test test_gap_help(">")
@test test_gap_help(">>")
@test test_gap_help("welcome to gap")
@test test_gap_help("?determinant")
@test test_gap_help("?PermList")
@test test_gap_help("?IsJuliaWrapper")
@test test_gap_help("books")
@test test_gap_help("tut:chapters")
@test test_gap_help("tut:sections")
@test test_gap_help("isobject")
@test test_gap_help("tut:isobject")
@test test_gap_help("ref:isobject")
@test test_gap_help("unknow")
@test test_gap_help("something for which no match is found")
REPL.TerminalMenus.config(supress_output = false)
end