fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1// This test checks the highlight colors in the source code pages. 2go-to: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html" 3show-text: true 4 5define-function: ( 6 "check-colors", 7 ( 8 theme, 9 kw, 10 kw2, 11 prelude_ty, 12 prelude_val, 13 lifetime, 14 number, 15 string, 16 bool_val, 17 self, 18 attr, 19 macro, 20 question_mark, 21 comment, 22 doc_comment, 23 ), 24 block { 25 set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"} 26 reload: 27 assert-css: ("pre.rust .kw", {"color": |kw|}, ALL) 28 assert-css: ("pre.rust .kw-2", {"color": |kw2|}, ALL) 29 assert-css: ("pre.rust .prelude-ty", {"color": |prelude_ty|}, ALL) 30 assert-css: ("pre.rust .prelude-val", {"color": |prelude_val|}, ALL) 31 assert-css: ("pre.rust .lifetime", {"color": |lifetime|}, ALL) 32 assert-css: ("pre.rust .number", {"color": |number|}, ALL) 33 assert-css: ("pre.rust .string", {"color": |string|}, ALL) 34 assert-css: ("pre.rust .bool-val", {"color": |bool_val|}, ALL) 35 assert-css: ("pre.rust .self", {"color": |self|}, ALL) 36 assert-css: ("pre.rust .attr", {"color": |attr|}, ALL) 37 assert-css: ("pre.rust .macro", {"color": |macro|}, ALL) 38 assert-css: ("pre.rust .question-mark", {"color": |question_mark|}, ALL) 39 assert-css: ("pre.rust .comment", {"color": |comment|}, ALL) 40 assert-css: ("pre.rust .doccomment", {"color": |doc_comment|}, ALL) 41 }, 42) 43 44call-function: ("check-colors", { 45 "theme": "ayu", 46 "kw": "#ff7733", 47 "kw2": "#ff7733", 48 "prelude_ty": "#69f2df", 49 "prelude_val": "#ff7733", 50 "lifetime": "#ff7733", 51 "number": "#b8cc52", 52 "string": "#b8cc52", 53 "bool_val": "#ff7733", 54 "self": "#36a3d9", 55 "attr": "#e6e1cf", 56 "macro": "#a37acc", 57 "question_mark": "#ff9011", 58 "comment": "#788797", 59 "doc_comment": "#a1ac88", 60}) 61call-function: ("check-colors", { 62 "theme": "dark", 63 "kw": "#ab8ac1", 64 "kw2": "#769acb", 65 "prelude_ty": "#769acb", 66 "prelude_val": "#ee6868", 67 "lifetime": "#d97f26", 68 "number": "#83a300", 69 "string": "#83a300", 70 "bool_val": "#ee6868", 71 "self": "#ee6868", 72 "attr": "#ee6868", 73 "macro": "#3e999f", 74 "question_mark": "#ff9011", 75 "comment": "#8d8d8b", 76 "doc_comment": "#8ca375", 77}) 78call-function: ("check-colors", { 79 "theme": "light", 80 "kw": "#8959a8", 81 "kw2": "#4271ae", 82 "prelude_ty": "#4271ae", 83 "prelude_val": "#c82829", 84 "lifetime": "#b76514", 85 "number": "#718c00", 86 "string": "#718c00", 87 "bool_val": "#c82829", 88 "self": "#c82829", 89 "attr": "#c82829", 90 "macro": "#3e999f", 91 "question_mark": "#ff9011", 92 "comment": "#8e908c", 93 "doc_comment": "#4d4d4c", 94})