summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2010-05-18 05:47:52 +0000
committermurphy <murphy@rubychan.de>2010-05-18 05:47:52 +0000
commit043d2a67c8895854415f575817e885e881e9fdaa (patch)
tree8fcf24ffdd01471058df1f5d4032e7de174b3e82 /test
parent804dda68dd006b16e0815e19d7dd4bac758ec934 (diff)
downloadcoderay-043d2a67c8895854415f575817e885e881e9fdaa.tar.gz
Simplified example test: It broke every time the default stylesheet was changed. Now it's independent.
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/examples.rb136
1 files changed, 1 insertions, 135 deletions
diff --git a/test/functional/examples.rb b/test/functional/examples.rb
index 25334c2..14f0aea 100755
--- a/test/functional/examples.rb
+++ b/test/functional/examples.rb
@@ -32,140 +32,7 @@ end
# output as standalone HTML page (using CSS classes)
page = CodeRay.scan('puts "Hello, world!"', :ruby).page
- assert_equal <<-PAGE, page
-<!DOCTYPE html>
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>CodeRay output</title>
- <style type="text/css">
-.CodeRay .line_numbers a, .CodeRay .no a {
- text-decoration: inherit;
- color: inherit;
-}
-.CodeRay {
- background-color: #f8f8f8;
- border: 1px solid silver;
- font-family: 'Courier New', 'Terminal', monospace;
- color: #000;
-}
-.CodeRay pre { margin: 0px; }
-
-span.CodeRay { white-space: pre; border: 0px; padding: 2px; }
-
-table.CodeRay { border-collapse: collapse; width: 100%; padding: 2px; }
-table.CodeRay td { padding: 2px 4px; vertical-align: top; }
-
-.CodeRay .line_numbers, .CodeRay .no {
- background-color: #def;
- color: gray;
- text-align: right;
-}
-.CodeRay .line_numbers a:target, .CodeRay .no a:target { color: blue; }
-.CodeRay .line_numbers .highlighted, .CodeRay .no .highlighted { color: red; }
-.CodeRay .no { padding: 0px 4px; }
-.CodeRay .code { width: 100%; }
-.CodeRay .code pre { overflow: auto; }
-
-.CodeRay .debug { color:white ! important; background:blue ! important; }
-
-.CodeRay .an { color:#007 }
-.CodeRay .at { color:#f08 }
-.CodeRay .av { color:#700 }
-.CodeRay .bi { color:#509; font-weight:bold }
-.CodeRay .c { color:#888; }
-.CodeRay .c .dl { color:#444; }
-.CodeRay .c .ch { color:#444; }
-
-.CodeRay .ch { color:#04D }
-.CodeRay .ch .k { color:#04D }
-.CodeRay .ch .dl { color:#039 }
-
-.CodeRay .cl { color:#B06; font-weight:bold }
-.CodeRay .cm { color:#A08; font-weight:bold }
-.CodeRay .co { color:#036; font-weight:bold }
-.CodeRay .cr { color:#0A0 }
-.CodeRay .cv { color:#369 }
-.CodeRay .de { color:#B0B; }
-.CodeRay .df { color:#099; font-weight:bold }
-.CodeRay .di { color:#088; font-weight:bold }
-.CodeRay .dl { color:black }
-.CodeRay .do { color:#970 }
-.CodeRay .dt { color:#34b }
-.CodeRay .ds { color:#D42; font-weight:bold }
-.CodeRay .e { color:#666; font-weight:bold }
-.CodeRay .en { color:#800; font-weight:bold }
-.CodeRay .er { color:#F00; background-color:#FAA }
-.CodeRay .ex { color:#C00; font-weight:bold }
-.CodeRay .fl { color:#60E; font-weight:bold }
-.CodeRay .fu { color:#06B; font-weight:bold }
-.CodeRay .gv { color:#d70; font-weight:bold }
-.CodeRay .hx { color:#058; font-weight:bold }
-.CodeRay .i { color:#00D; font-weight:bold }
-.CodeRay .ic { color:#B44; font-weight:bold }
-
-.CodeRay .il { background-color: hsla(0,0%,0%,0.1); color: black }
-.CodeRay .il .idl { font-weight: bold; color: #666 }
-.CodeRay .idl { font-weight: bold; color: #666; }
-
-.CodeRay .im { color:#f00; }
-.CodeRay .in { color:#B2B; font-weight:bold }
-.CodeRay .iv { color:#33B }
-.CodeRay .la { color:#970; font-weight:bold }
-.CodeRay .lv { color:#963 }
-.CodeRay .ns { color:#707; font-weight:bold }
-.CodeRay .oc { color:#40E; font-weight:bold }
-.CodeRay .op { }
-.CodeRay .pc { color:#058; font-weight:bold }
-.CodeRay .pd { color:#369; font-weight:bold }
-.CodeRay .pp { color:#579; }
-.CodeRay .ps { color:#00C; font-weight:bold }
-.CodeRay .pt { color:#074; font-weight:bold }
-.CodeRay .r, .kw { color:#080; font-weight:bold }
-
-.CodeRay .ke { color: #808; }
-.CodeRay .ke .dl { color: #606; }
-.CodeRay .ke .ch { color: #80f; }
-.CodeRay .vl { color: #088; }
-
-.CodeRay .rx { background-color:hsla(300,100%,50%,0.1); color:#808 }
-.CodeRay .rx .k { }
-.CodeRay .rx .dl { color:#404 }
-.CodeRay .rx .mod { color:#C2C }
-.CodeRay .rx .fu { color:#404; font-weight: bold }
-
-.CodeRay .s { background-color:hsla(0,100%,50%,0.1); color: #D20; }
-.CodeRay .s .k { }
-.CodeRay .s .ch { color: #b0b; }
-.CodeRay .s .dl { color: #710; }
-
-.CodeRay .sh { background-color:hsla(120,100%,50%,0.1); color:#2B2 }
-.CodeRay .sh .k { }
-.CodeRay .sh .dl { color:#161 }
-
-.CodeRay .sy { color:#A60 }
-.CodeRay .sy .k { color:#A60 }
-.CodeRay .sy .dl { color:#630 }
-
-.CodeRay .ta { color:#070 }
-.CodeRay .ts { color:#D70; font-weight:bold }
-.CodeRay .ty { color:#339; font-weight:bold }
-.CodeRay .v { color:#036 }
-.CodeRay .xt { color:#444 }
-
-.CodeRay .ins { background: #afa; }
-.CodeRay .del { background: #faa; }
-.CodeRay .chg { color: #aaf; background: #007; }
-.CodeRay .head { color: #f8f; background: #505 }
-.CodeRay .head .filename { color: white; }
-
-.CodeRay .ins .ins { color: #080; font-weight:bold }
-.CodeRay .del .del { color: #800; font-weight:bold }
-.CodeRay .chg .chg { color: #66f; }
-.CodeRay .head .head { color: #f4f; }
-
- </style>
-</head>
+ assert page[<<-PAGE]
<body style="background-color: white;">
<table class="CodeRay"><tr>
@@ -175,7 +42,6 @@ table.CodeRay td { padding: 2px 4px; vertical-align: top; }
</tr></table>
</body>
-</html>
PAGE
# keep scanned tokens for later use