thewoolleyman-webgen 0.5.8.20090419
Sign up to get free protection for your applications and to get access to all the features.
- data/AUTHORS +8 -0
- data/COPYING +10 -0
- data/GPL +340 -0
- data/Rakefile +334 -0
- data/THANKS +18 -0
- data/bin/webgen +12 -0
- data/data/webgen/resources.yaml +3 -0
- data/data/webgen/webgui/controller/main.rb +135 -0
- data/data/webgen/webgui/overrides/win32console.rb +0 -0
- data/data/webgen/webgui/public/css/jquery.autocomplete.css +50 -0
- data/data/webgen/webgui/public/css/ramaze_error.css +90 -0
- data/data/webgen/webgui/public/css/style.css +55 -0
- data/data/webgen/webgui/public/img/headerbg.jpg +0 -0
- data/data/webgen/webgui/public/img/webgen_logo.png +0 -0
- data/data/webgen/webgui/public/js/jquery.autocomplete.js +15 -0
- data/data/webgen/webgui/public/js/jquery.js +32 -0
- data/data/webgen/webgui/view/create_website.xhtml +22 -0
- data/data/webgen/webgui/view/error.xhtml +64 -0
- data/data/webgen/webgui/view/index.xhtml +22 -0
- data/data/webgen/webgui/view/manage_website.xhtml +18 -0
- data/data/webgen/webgui/view/page.xhtml +40 -0
- data/data/webgen/website_skeleton/README +10 -0
- data/data/webgen/website_skeleton/Rakefile +40 -0
- data/data/webgen/website_skeleton/config.yaml +17 -0
- data/data/webgen/website_skeleton/ext/init.rb +10 -0
- data/data/webgen/website_styles/1024px/README +13 -0
- data/data/webgen/website_styles/1024px/src/default.css +188 -0
- data/data/webgen/website_styles/1024px/src/default.template +60 -0
- data/data/webgen/website_styles/1024px/src/images/background.gif +0 -0
- data/data/webgen/website_styles/andreas00/README +13 -0
- data/data/webgen/website_styles/andreas00/src/default.css +290 -0
- data/data/webgen/website_styles/andreas00/src/default.template +60 -0
- data/data/webgen/website_styles/andreas00/src/images/bg.gif +0 -0
- data/data/webgen/website_styles/andreas00/src/images/front.jpg +0 -0
- data/data/webgen/website_styles/andreas00/src/images/menubg.gif +0 -0
- data/data/webgen/website_styles/andreas00/src/images/menubg2.gif +0 -0
- data/data/webgen/website_styles/andreas01/README +14 -0
- data/data/webgen/website_styles/andreas01/src/default.css +310 -0
- data/data/webgen/website_styles/andreas01/src/default.template +62 -0
- data/data/webgen/website_styles/andreas01/src/images/bg.gif +0 -0
- data/data/webgen/website_styles/andreas01/src/images/front.jpg +0 -0
- data/data/webgen/website_styles/andreas01/src/print.css +35 -0
- data/data/webgen/website_styles/andreas03/README +14 -0
- data/data/webgen/website_styles/andreas03/src/default.css +223 -0
- data/data/webgen/website_styles/andreas03/src/default.template +58 -0
- data/data/webgen/website_styles/andreas03/src/images/bodybg.png +0 -0
- data/data/webgen/website_styles/andreas03/src/images/contbg.png +0 -0
- data/data/webgen/website_styles/andreas03/src/images/footerbg.png +0 -0
- data/data/webgen/website_styles/andreas03/src/images/gradient1.png +0 -0
- data/data/webgen/website_styles/andreas03/src/images/gradient2.png +0 -0
- data/data/webgen/website_styles/andreas04/README +15 -0
- data/data/webgen/website_styles/andreas04/src/default.css +290 -0
- data/data/webgen/website_styles/andreas04/src/default.template +81 -0
- data/data/webgen/website_styles/andreas04/src/images/blinkarrow.gif +0 -0
- data/data/webgen/website_styles/andreas04/src/images/bodybg.png +0 -0
- data/data/webgen/website_styles/andreas04/src/images/contentbg.png +0 -0
- data/data/webgen/website_styles/andreas04/src/images/entrybg.png +0 -0
- data/data/webgen/website_styles/andreas04/src/images/flash.gif +0 -0
- data/data/webgen/website_styles/andreas04/src/images/flash2.gif +0 -0
- data/data/webgen/website_styles/andreas04/src/images/globe.gif +0 -0
- data/data/webgen/website_styles/andreas04/src/images/globebottom.gif +0 -0
- data/data/webgen/website_styles/andreas04/src/images/linkarrow.gif +0 -0
- data/data/webgen/website_styles/andreas04/src/images/menuhover.png +0 -0
- data/data/webgen/website_styles/andreas05/README +14 -0
- data/data/webgen/website_styles/andreas05/src/default.css +33 -0
- data/data/webgen/website_styles/andreas05/src/default.template +40 -0
- data/data/webgen/website_styles/andreas05/src/images/bodybg.gif +0 -0
- data/data/webgen/website_styles/andreas05/src/images/front.png +0 -0
- data/data/webgen/website_styles/andreas06/README +14 -0
- data/data/webgen/website_styles/andreas06/src/default.css +354 -0
- data/data/webgen/website_styles/andreas06/src/default.template +70 -0
- data/data/webgen/website_styles/andreas06/src/images/bodybg.gif +0 -0
- data/data/webgen/website_styles/andreas06/src/images/boxbg.gif +0 -0
- data/data/webgen/website_styles/andreas06/src/images/greypx.gif +0 -0
- data/data/webgen/website_styles/andreas06/src/images/header.jpg +0 -0
- data/data/webgen/website_styles/andreas06/src/images/innerbg.gif +0 -0
- data/data/webgen/website_styles/andreas06/src/images/leaves.jpg +0 -0
- data/data/webgen/website_styles/andreas06/src/images/tabs.gif +0 -0
- data/data/webgen/website_styles/andreas07/README +15 -0
- data/data/webgen/website_styles/andreas07/src/browserfix.css +7 -0
- data/data/webgen/website_styles/andreas07/src/default.css +92 -0
- data/data/webgen/website_styles/andreas07/src/default.template +42 -0
- data/data/webgen/website_styles/andreas07/src/images/bodybg.gif +0 -0
- data/data/webgen/website_styles/andreas07/src/images/sidebarbg.gif +0 -0
- data/data/webgen/website_styles/andreas08/README +14 -0
- data/data/webgen/website_styles/andreas08/src/default.css +224 -0
- data/data/webgen/website_styles/andreas08/src/default.template +51 -0
- data/data/webgen/website_styles/andreas09/README +14 -0
- data/data/webgen/website_styles/andreas09/src/default.css +308 -0
- data/data/webgen/website_styles/andreas09/src/default.template +68 -0
- data/data/webgen/website_styles/andreas09/src/images/bodybg-black.jpg +0 -0
- data/data/webgen/website_styles/andreas09/src/images/bodybg-green.jpg +0 -0
- data/data/webgen/website_styles/andreas09/src/images/bodybg-orange.jpg +0 -0
- data/data/webgen/website_styles/andreas09/src/images/bodybg-purple.jpg +0 -0
- data/data/webgen/website_styles/andreas09/src/images/bodybg-red.jpg +0 -0
- data/data/webgen/website_styles/andreas09/src/images/bodybg.jpg +0 -0
- data/data/webgen/website_styles/andreas09/src/images/footerbg.jpg +0 -0
- data/data/webgen/website_styles/andreas09/src/images/menuhover-black.jpg +0 -0
- data/data/webgen/website_styles/andreas09/src/images/menuhover-green.jpg +0 -0
- data/data/webgen/website_styles/andreas09/src/images/menuhover-orange.jpg +0 -0
- data/data/webgen/website_styles/andreas09/src/images/menuhover-purple.jpg +0 -0
- data/data/webgen/website_styles/andreas09/src/images/menuhover-red.jpg +0 -0
- data/data/webgen/website_styles/andreas09/src/images/menuhover.jpg +0 -0
- data/data/webgen/website_styles/simple/README +6 -0
- data/data/webgen/website_styles/simple/src/default.css +84 -0
- data/data/webgen/website_styles/simple/src/default.template +36 -0
- data/data/webgen/website_templates/default/README +6 -0
- data/data/webgen/website_templates/default/src/index.page +8 -0
- data/data/webgen/website_templates/project/README +5 -0
- data/data/webgen/website_templates/project/src/about.page +12 -0
- data/data/webgen/website_templates/project/src/download.page +15 -0
- data/data/webgen/website_templates/project/src/features.page +8 -0
- data/data/webgen/website_templates/project/src/index.page +9 -0
- data/data/webgen/website_templates/project/src/screenshots.page +18 -0
- data/doc/contentprocessor.template +11 -0
- data/doc/contentprocessor/blocks.page +129 -0
- data/doc/contentprocessor/builder.page +80 -0
- data/doc/contentprocessor/erb.page +59 -0
- data/doc/contentprocessor/erubis.page +46 -0
- data/doc/contentprocessor/fragments.page +25 -0
- data/doc/contentprocessor/haml.page +47 -0
- data/doc/contentprocessor/maruku.page +41 -0
- data/doc/contentprocessor/rdiscount.page +37 -0
- data/doc/contentprocessor/rdoc.page +36 -0
- data/doc/contentprocessor/redcloth.page +39 -0
- data/doc/contentprocessor/sass.page +31 -0
- data/doc/contentprocessor/tags.page +73 -0
- data/doc/extensions.metainfo +29 -0
- data/doc/extensions.page +16 -0
- data/doc/extensions.template +17 -0
- data/doc/faq.page +219 -0
- data/doc/getting_started.page +135 -0
- data/doc/index.page +65 -0
- data/doc/manual.page +589 -0
- data/doc/reference_configuration.page +959 -0
- data/doc/reference_metainfo.page +222 -0
- data/doc/source/filesystem.page +39 -0
- data/doc/source/tararchive.page +40 -0
- data/doc/sourcehandler.template +21 -0
- data/doc/sourcehandler/copy.page +19 -0
- data/doc/sourcehandler/directory.page +27 -0
- data/doc/sourcehandler/feed.page +105 -0
- data/doc/sourcehandler/metainfo.page +41 -0
- data/doc/sourcehandler/page.page +14 -0
- data/doc/sourcehandler/sitemap.page +46 -0
- data/doc/sourcehandler/template.page +45 -0
- data/doc/sourcehandler/virtual.page +49 -0
- data/doc/tag.template +25 -0
- data/doc/tag/breadcrumbtrail.page +40 -0
- data/doc/tag/coderay.page +49 -0
- data/doc/tag/date.page +31 -0
- data/doc/tag/executecommand.page +26 -0
- data/doc/tag/includefile.page +32 -0
- data/doc/tag/langbar.page +44 -0
- data/doc/tag/link.page +44 -0
- data/doc/tag/menu.page +106 -0
- data/doc/tag/metainfo.page +29 -0
- data/doc/tag/relocatable.page +38 -0
- data/doc/tag/sitemap.page +31 -0
- data/doc/tag/tikz.page +158 -0
- data/doc/upgrading.page +139 -0
- data/doc/webgen_page_format.page +129 -0
- data/lib/webgen/blackboard.rb +78 -0
- data/lib/webgen/cache.rb +87 -0
- data/lib/webgen/cli.rb +124 -0
- data/lib/webgen/cli/apply_command.rb +64 -0
- data/lib/webgen/cli/create_command.rb +66 -0
- data/lib/webgen/cli/run_command.rb +22 -0
- data/lib/webgen/cli/utils.rb +88 -0
- data/lib/webgen/cli/webgui_command.rb +72 -0
- data/lib/webgen/common.rb +21 -0
- data/lib/webgen/common/sitemap.rb +83 -0
- data/lib/webgen/configuration.rb +153 -0
- data/lib/webgen/contentprocessor.rb +99 -0
- data/lib/webgen/contentprocessor/blocks.rb +60 -0
- data/lib/webgen/contentprocessor/builder.rb +30 -0
- data/lib/webgen/contentprocessor/context.rb +89 -0
- data/lib/webgen/contentprocessor/erb.rb +28 -0
- data/lib/webgen/contentprocessor/erubis.rb +40 -0
- data/lib/webgen/contentprocessor/fragments.rb +25 -0
- data/lib/webgen/contentprocessor/haml.rb +30 -0
- data/lib/webgen/contentprocessor/maruku.rb +20 -0
- data/lib/webgen/contentprocessor/rdiscount.rb +17 -0
- data/lib/webgen/contentprocessor/rdoc.rb +19 -0
- data/lib/webgen/contentprocessor/redcloth.rb +17 -0
- data/lib/webgen/contentprocessor/sass.rb +20 -0
- data/lib/webgen/contentprocessor/tags.rb +136 -0
- data/lib/webgen/coreext.rb +13 -0
- data/lib/webgen/default_config.rb +215 -0
- data/lib/webgen/languages.rb +589 -0
- data/lib/webgen/loggable.rb +25 -0
- data/lib/webgen/logger.rb +97 -0
- data/lib/webgen/node.rb +391 -0
- data/lib/webgen/output.rb +82 -0
- data/lib/webgen/output/filesystem.rb +69 -0
- data/lib/webgen/page.rb +153 -0
- data/lib/webgen/path.rb +194 -0
- data/lib/webgen/source.rb +54 -0
- data/lib/webgen/source/filesystem.rb +61 -0
- data/lib/webgen/source/resource.rb +44 -0
- data/lib/webgen/source/stacked.rb +55 -0
- data/lib/webgen/source/tararchive.rb +73 -0
- data/lib/webgen/sourcehandler.rb +226 -0
- data/lib/webgen/sourcehandler/base.rb +248 -0
- data/lib/webgen/sourcehandler/copy.rb +43 -0
- data/lib/webgen/sourcehandler/directory.rb +36 -0
- data/lib/webgen/sourcehandler/feed.rb +117 -0
- data/lib/webgen/sourcehandler/fragment.rb +68 -0
- data/lib/webgen/sourcehandler/memory.rb +43 -0
- data/lib/webgen/sourcehandler/metainfo.rb +128 -0
- data/lib/webgen/sourcehandler/page.rb +59 -0
- data/lib/webgen/sourcehandler/sitemap.rb +60 -0
- data/lib/webgen/sourcehandler/template.rb +66 -0
- data/lib/webgen/sourcehandler/virtual.rb +110 -0
- data/lib/webgen/tag.rb +27 -0
- data/lib/webgen/tag/base.rb +170 -0
- data/lib/webgen/tag/breadcrumbtrail.rb +70 -0
- data/lib/webgen/tag/coderay.rb +31 -0
- data/lib/webgen/tag/date.rb +18 -0
- data/lib/webgen/tag/executecommand.rb +30 -0
- data/lib/webgen/tag/includefile.rb +42 -0
- data/lib/webgen/tag/langbar.rb +52 -0
- data/lib/webgen/tag/link.rb +26 -0
- data/lib/webgen/tag/menu.rb +207 -0
- data/lib/webgen/tag/metainfo.rb +25 -0
- data/lib/webgen/tag/relocatable.rb +54 -0
- data/lib/webgen/tag/sitemap.rb +41 -0
- data/lib/webgen/tag/tikz.rb +119 -0
- data/lib/webgen/tree.rb +90 -0
- data/lib/webgen/version.rb +8 -0
- data/lib/webgen/webgentask.rb +152 -0
- data/lib/webgen/website.rb +342 -0
- data/lib/webgen/websiteaccess.rb +31 -0
- data/lib/webgen/websitemanager.rb +127 -0
- data/man/man1/webgen.1 +73 -0
- data/misc/default.css +384 -0
- data/misc/default.template +75 -0
- data/misc/htmldoc.metainfo +25 -0
- data/misc/htmldoc.virtual +5 -0
- data/misc/images/arrow.gif +0 -0
- data/misc/images/error.png +0 -0
- data/misc/images/headerbg.jpg +0 -0
- data/misc/images/important.png +0 -0
- data/misc/images/information.png +0 -0
- data/misc/images/quote.gif +0 -0
- data/misc/images/warning.png +0 -0
- data/setup.rb +1585 -0
- data/test/helper.rb +45 -0
- data/test/test_blackboard.rb +60 -0
- data/test/test_cache.rb +59 -0
- data/test/test_cli.rb +21 -0
- data/test/test_common.rb +18 -0
- data/test/test_common_sitemap.rb +58 -0
- data/test/test_configuration.rb +68 -0
- data/test/test_contentprocessor.rb +33 -0
- data/test/test_contentprocessor_blocks.rb +68 -0
- data/test/test_contentprocessor_builder.rb +23 -0
- data/test/test_contentprocessor_context.rb +40 -0
- data/test/test_contentprocessor_erb.rb +23 -0
- data/test/test_contentprocessor_erubis.rb +49 -0
- data/test/test_contentprocessor_fragments.rb +42 -0
- data/test/test_contentprocessor_haml.rb +23 -0
- data/test/test_contentprocessor_maruku.rb +29 -0
- data/test/test_contentprocessor_rdiscount.rb +17 -0
- data/test/test_contentprocessor_rdoc.rb +18 -0
- data/test/test_contentprocessor_redcloth.rb +15 -0
- data/test/test_contentprocessor_sass.rb +22 -0
- data/test/test_contentprocessor_tags.rb +99 -0
- data/test/test_languages.rb +67 -0
- data/test/test_loggable.rb +32 -0
- data/test/test_logger.rb +94 -0
- data/test/test_node.rb +367 -0
- data/test/test_output_filesystem.rb +60 -0
- data/test/test_page.rb +214 -0
- data/test/test_path.rb +165 -0
- data/test/test_source_filesystem.rb +76 -0
- data/test/test_source_resource.rb +28 -0
- data/test/test_source_stacked.rb +36 -0
- data/test/test_source_tararchive.rb +65 -0
- data/test/test_sourcehandler_base.rb +123 -0
- data/test/test_sourcehandler_copy.rb +47 -0
- data/test/test_sourcehandler_directory.rb +42 -0
- data/test/test_sourcehandler_feed.rb +77 -0
- data/test/test_sourcehandler_fragment.rb +69 -0
- data/test/test_sourcehandler_memory.rb +44 -0
- data/test/test_sourcehandler_metainfo.rb +118 -0
- data/test/test_sourcehandler_page.rb +65 -0
- data/test/test_sourcehandler_sitemap.rb +49 -0
- data/test/test_sourcehandler_template.rb +65 -0
- data/test/test_sourcehandler_virtual.rb +87 -0
- data/test/test_tag_base.rb +85 -0
- data/test/test_tag_breadcrumbtrail.rb +91 -0
- data/test/test_tag_coderay.rb +32 -0
- data/test/test_tag_date.rb +18 -0
- data/test/test_tag_executecommand.rb +41 -0
- data/test/test_tag_includefile.rb +50 -0
- data/test/test_tag_langbar.rb +72 -0
- data/test/test_tag_link.rb +69 -0
- data/test/test_tag_menu.rb +207 -0
- data/test/test_tag_metainfo.rb +19 -0
- data/test/test_tag_relocatable.rb +59 -0
- data/test/test_tag_sitemap.rb +47 -0
- data/test/test_tag_tikz.rb +69 -0
- data/test/test_tree.rb +70 -0
- data/test/test_webgentask.rb +23 -0
- data/test/test_website.rb +98 -0
- data/test/test_websiteaccess.rb +25 -0
- data/test/test_websitemanager.rb +70 -0
- metadata +613 -0
@@ -0,0 +1,32 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
require 'test/unit'
|
4
|
+
require 'helper'
|
5
|
+
require 'webgen/loggable'
|
6
|
+
require 'webgen/logger'
|
7
|
+
require 'stringio'
|
8
|
+
|
9
|
+
class TestLoggable < Test::Unit::TestCase
|
10
|
+
|
11
|
+
include Test::WebsiteHelper
|
12
|
+
|
13
|
+
def setup
|
14
|
+
super
|
15
|
+
@website.logger = Webgen::Logger.new(@io = StringIO.new, true)
|
16
|
+
@obj = Object.new
|
17
|
+
@obj.extend(Webgen::Loggable)
|
18
|
+
end
|
19
|
+
|
20
|
+
def test_log
|
21
|
+
@obj.log(:error) { 'hallo' }
|
22
|
+
assert_equal("ERROR -- hallo\n", @io.string)
|
23
|
+
end
|
24
|
+
|
25
|
+
def test_puts
|
26
|
+
@obj.puts 'test'
|
27
|
+
assert_equal("test\n", @io.string)
|
28
|
+
@obj.puts 'test', :verbose
|
29
|
+
assert_equal("test\n", @io.string)
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
data/test/test_logger.rb
ADDED
@@ -0,0 +1,94 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
require 'test/unit'
|
4
|
+
require 'helper'
|
5
|
+
require 'webgen/logger'
|
6
|
+
|
7
|
+
class TestLogger < Test::Unit::TestCase
|
8
|
+
|
9
|
+
def test_initialize
|
10
|
+
l = Webgen::Logger.new(io = StringIO.new)
|
11
|
+
assert_equal(:normal, l.verbosity)
|
12
|
+
assert_equal(::Logger::WARN, l.level)
|
13
|
+
assert_equal(false, l.sync)
|
14
|
+
end
|
15
|
+
|
16
|
+
def test_setters
|
17
|
+
l = Webgen::Logger.new(io = StringIO.new)
|
18
|
+
l.verbosity = :quiet
|
19
|
+
l.level = ::Logger::DEBUG
|
20
|
+
assert_equal(::Logger::DEBUG, l.level)
|
21
|
+
assert_equal(:quiet, l.verbosity)
|
22
|
+
end
|
23
|
+
|
24
|
+
def test_log_sync
|
25
|
+
l = Webgen::Logger.new(io = StringIO.new, true)
|
26
|
+
l.error { 'error' }
|
27
|
+
l.stdout { 'hallo' }
|
28
|
+
l.warn { 'warn' }
|
29
|
+
l.info { 'info' }
|
30
|
+
l.debug { 'debug' }
|
31
|
+
assert_equal("ERROR -- error\nhallo\n WARN -- warn\n", io.string)
|
32
|
+
end
|
33
|
+
|
34
|
+
def test_log_async
|
35
|
+
l = Webgen::Logger.new(io = StringIO.new, false)
|
36
|
+
l.error { 'error' }
|
37
|
+
l.stdout { 'hallo' }
|
38
|
+
assert_equal("hallo\n", io.string)
|
39
|
+
end
|
40
|
+
|
41
|
+
def test_verbosity_levels
|
42
|
+
l = Webgen::Logger.new(io = StringIO.new)
|
43
|
+
l.verbose { 'vrb'}
|
44
|
+
l.stdout { 'std' }
|
45
|
+
assert_equal("std\n", io.string)
|
46
|
+
|
47
|
+
io.string = ''
|
48
|
+
l.verbosity = :verbose
|
49
|
+
l.verbose { 'vrb' }
|
50
|
+
assert_equal("vrb\n", io.string)
|
51
|
+
|
52
|
+
io.string = ''
|
53
|
+
l.verbosity = :quiet
|
54
|
+
l.stdout { 'vrb' }
|
55
|
+
assert_equal("", io.string)
|
56
|
+
end
|
57
|
+
|
58
|
+
def test_debug_format
|
59
|
+
l = Webgen::Logger.new(io = StringIO.new, true)
|
60
|
+
l.level = ::Logger::DEBUG
|
61
|
+
l.info('source') { 'hallo' }
|
62
|
+
assert_equal(" INFO -- source: hallo\n", io.string)
|
63
|
+
end
|
64
|
+
|
65
|
+
def test_log_output
|
66
|
+
l = Webgen::Logger.new(io = StringIO.new, true)
|
67
|
+
l.error { 'hallo' }
|
68
|
+
assert_equal('', l.log_output)
|
69
|
+
|
70
|
+
l = Webgen::Logger.new(io = StringIO.new, false)
|
71
|
+
l.error { 'hallo' }
|
72
|
+
assert_equal("ERROR -- hallo\n", l.log_output)
|
73
|
+
end
|
74
|
+
|
75
|
+
def test_run_marks
|
76
|
+
l = Webgen::Logger.new(io = StringIO.new, true)
|
77
|
+
l.mark_new_cycle
|
78
|
+
l.error { 'hallo' }
|
79
|
+
assert_equal("", l.log_output)
|
80
|
+
|
81
|
+
l = Webgen::Logger.new(io = StringIO.new, false)
|
82
|
+
l.error { 'hallo' }
|
83
|
+
l.mark_new_cycle
|
84
|
+
l.error { 'other' }
|
85
|
+
l.mark_new_cycle
|
86
|
+
assert_equal("ERROR -- hallo\n INFO -- Log messages for run 1 are following\n" +
|
87
|
+
"ERROR -- other\n INFO -- Log messages for run 2 are following\n", l.log_output)
|
88
|
+
|
89
|
+
l = Webgen::Logger.new(io = StringIO.new, false)
|
90
|
+
l.mark_new_cycle
|
91
|
+
assert_equal("", l.log_output)
|
92
|
+
end
|
93
|
+
|
94
|
+
end
|
data/test/test_node.rb
ADDED
@@ -0,0 +1,367 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
require 'test/unit'
|
4
|
+
require 'helper'
|
5
|
+
require 'webgen/node'
|
6
|
+
require 'webgen/tree'
|
7
|
+
|
8
|
+
class TestNode < Test::Unit::TestCase
|
9
|
+
|
10
|
+
include Test::WebsiteHelper
|
11
|
+
|
12
|
+
def setup
|
13
|
+
super
|
14
|
+
@tree = Webgen::Tree.new
|
15
|
+
end
|
16
|
+
|
17
|
+
def create_default_nodes
|
18
|
+
{
|
19
|
+
:root => node = Webgen::Node.new(@tree.dummy_root, '/', '/'),
|
20
|
+
:somename_en => child_en = Webgen::Node.new(node, '/somename.en.html', 'somename.page', {'lang' => 'en', 'title' => 'somename'}),
|
21
|
+
:somename_de => child_de = Webgen::Node.new(node, '/somename.de.html', 'somename.page', {'lang' => 'de'}),
|
22
|
+
:other => Webgen::Node.new(node, '/other.html', 'other.page', {}),
|
23
|
+
:other_en => Webgen::Node.new(node, '/other1.html', 'other.page', {'lang' => 'en'}),
|
24
|
+
:somename_en_frag => frag_en = Webgen::Node.new(child_en, '/somename.en.html#frag', '#othertest', {'title' => 'frag'}),
|
25
|
+
:somename_de_frag => Webgen::Node.new(child_de, '/somename.de.html#frag', '#othertest'),
|
26
|
+
:somename_en_fragnest => Webgen::Node.new(frag_en, '/somename.en.html#fragnest', '#nestedpath'),
|
27
|
+
:dir => dir = Webgen::Node.new(node, '/dir/', 'dir/'),
|
28
|
+
:dir_file => dir_file = Webgen::Node.new(dir, '/dir/file.html', 'file.html'),
|
29
|
+
:dir_file_frag => Webgen::Node.new(dir_file, '/dir/file.html#frag', '#frag'),
|
30
|
+
:dir2 => dir2 = Webgen::Node.new(node, '/dir2/', 'dir2/', {'index_path' => 'index.html', 'title' => 'dir2'}),
|
31
|
+
:dir2_index_en => Webgen::Node.new(dir2, '/dir2/index.html', 'index.html', {'lang' => 'en', 'routed_title' => 'routed', 'title' => 'index'}),
|
32
|
+
:dir2_index_de => Webgen::Node.new(dir2, '/dir2/index.de.html', 'index.html', {'lang' => 'de', 'routed_title' => 'routed_de', 'title' => 'index'}),
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
36
|
+
def test_initialize_and_reinit
|
37
|
+
check_proc = proc do |node, parent, path, cn, lcn, alcn, lang, mi|
|
38
|
+
assert_equal(parent, node.parent)
|
39
|
+
assert_equal(path, node.path)
|
40
|
+
assert_equal(cn, node.cn)
|
41
|
+
assert_equal(lcn, node.lcn)
|
42
|
+
assert_equal(alcn, node.absolute_lcn)
|
43
|
+
assert_equal(lang, node.lang)
|
44
|
+
assert_kind_of(Webgen::Language, node.lang) if node.lang
|
45
|
+
assert(node.flagged(:dirty))
|
46
|
+
assert(node.flagged(:created))
|
47
|
+
assert_equal(mi, node.meta_info)
|
48
|
+
assert_equal({:used_nodes => Set.new, :used_meta_info_nodes => Set.new}, node.node_info)
|
49
|
+
mi.each {|k,v| assert_equal(v, node[k])}
|
50
|
+
end
|
51
|
+
|
52
|
+
node = Webgen::Node.new(@tree.dummy_root, 'test/', 'test', {'lang' => 'de', :test => :value})
|
53
|
+
check_proc.call(node, @tree.dummy_root, 'test/', 'test', 'test', '/test', nil, {:test => :value})
|
54
|
+
|
55
|
+
child = Webgen::Node.new(node, 'somename.html', 'somename.page', {'lang' => 'de'})
|
56
|
+
check_proc.call(child, node, 'somename.html', 'somename.page', 'somename.de.page',
|
57
|
+
'/test/somename.de.page', 'de', {})
|
58
|
+
|
59
|
+
['http://webgen.rubyforge.org', 'c:\\test'].each_with_index do |abspath, index|
|
60
|
+
cn = 'test' + index.to_s + '.html'
|
61
|
+
c = Webgen::Node.new(node, abspath, cn)
|
62
|
+
check_proc.call(c, node, abspath, cn, cn, '/test/' + cn, nil, {})
|
63
|
+
end
|
64
|
+
|
65
|
+
child.reinit('somename.en.html', {'lang' => 'de', 'title' => 'test'})
|
66
|
+
check_proc.call(child, node, 'somename.en.html', 'somename.page', 'somename.de.page',
|
67
|
+
'/test/somename.de.page', 'de', {'title' => 'test'})
|
68
|
+
end
|
69
|
+
|
70
|
+
def test_type_checkers
|
71
|
+
nodes = create_default_nodes
|
72
|
+
assert(nodes[:root].is_directory?)
|
73
|
+
assert(nodes[:somename_en].is_file?)
|
74
|
+
assert(nodes[:somename_en_frag].is_fragment?)
|
75
|
+
assert(nodes[:root].is_root?)
|
76
|
+
assert(!nodes[:somename_en].is_root?)
|
77
|
+
end
|
78
|
+
|
79
|
+
def test_meta_info_assignment
|
80
|
+
node = Webgen::Node.new(@tree.dummy_root, 'test/', 'test', {'lang' => 'de', :test => :value})
|
81
|
+
node[:test] = :newvalue
|
82
|
+
node[:other] = :value
|
83
|
+
assert_equal(:newvalue, node[:test])
|
84
|
+
assert_equal(:value, node[:other])
|
85
|
+
end
|
86
|
+
|
87
|
+
def test_flags
|
88
|
+
node = Webgen::Node.new(@tree.dummy_root, 'test/', 'test', {'lang' => 'de', :test => :value})
|
89
|
+
assert(node.flagged(:created))
|
90
|
+
assert(node.flagged(:dirty))
|
91
|
+
node.unflag(:dirty)
|
92
|
+
assert(!node.flagged(:dirty))
|
93
|
+
node.flag(:a, :b, :c)
|
94
|
+
assert(node.flagged(:a))
|
95
|
+
assert(node.flagged(:b))
|
96
|
+
assert(node.flagged(:c))
|
97
|
+
node.unflag(:a, :b, :c)
|
98
|
+
assert(!node.flagged(:a))
|
99
|
+
assert(!node.flagged(:b))
|
100
|
+
assert(!node.flagged(:c))
|
101
|
+
end
|
102
|
+
|
103
|
+
def test_in_lang
|
104
|
+
nodes = create_default_nodes
|
105
|
+
|
106
|
+
assert_equal(nodes[:somename_de], nodes[:somename_en].in_lang('de'))
|
107
|
+
assert_equal(nodes[:somename_en], nodes[:somename_en].in_lang('en'))
|
108
|
+
assert_equal(nodes[:somename_en], nodes[:somename_de].in_lang('en'))
|
109
|
+
assert_equal(nil, nodes[:somename_de].in_lang('fr'))
|
110
|
+
assert_equal(nil, nodes[:somename_en].in_lang(nil))
|
111
|
+
|
112
|
+
assert_equal(nodes[:other_en], nodes[:other].in_lang('en'))
|
113
|
+
assert_equal(nodes[:other], nodes[:other].in_lang('de'))
|
114
|
+
assert_equal(nodes[:other], nodes[:other].in_lang(nil))
|
115
|
+
assert_equal(nodes[:other], nodes[:other_en].in_lang(nil))
|
116
|
+
assert_equal(nodes[:other], nodes[:other_en].in_lang('de'))
|
117
|
+
|
118
|
+
assert_equal(nil, nodes[:somename_en_frag].in_lang(nil))
|
119
|
+
assert_equal(nodes[:somename_en_frag], nodes[:somename_en_frag].in_lang('en'))
|
120
|
+
assert_equal(nodes[:somename_de_frag], nodes[:somename_en_frag].in_lang('de'))
|
121
|
+
end
|
122
|
+
|
123
|
+
def test_resolve
|
124
|
+
nodes = create_default_nodes
|
125
|
+
|
126
|
+
[nodes[:root], nodes[:somename_de], nodes[:somename_en], nodes[:other]].each do |n|
|
127
|
+
assert_equal(nil, n.resolve('somename.page', nil))
|
128
|
+
assert_equal(nodes[:somename_en], n.resolve('somename.page', 'en'))
|
129
|
+
assert_equal(nodes[:somename_de], n.resolve('somename.page', 'de'))
|
130
|
+
assert_equal(nil, n.resolve('somename.page', 'fr'))
|
131
|
+
assert_equal(nodes[:somename_en], n.resolve('somename.en.page', nil))
|
132
|
+
assert_equal(nodes[:somename_en], n.resolve('somename.en.page', 'en'))
|
133
|
+
assert_equal(nodes[:somename_en], n.resolve('somename.en.page', 'de'))
|
134
|
+
assert_equal(nil, n.resolve('somename.fr.page', 'de'))
|
135
|
+
|
136
|
+
assert_equal(nodes[:other], n.resolve('other.page', nil))
|
137
|
+
assert_equal(nodes[:other], n.resolve('other.page', 'fr'))
|
138
|
+
assert_equal(nodes[:other_en], n.resolve('other.page', 'en'))
|
139
|
+
assert_equal(nodes[:other_en], n.resolve('other.en.page', nil))
|
140
|
+
assert_equal(nodes[:other_en], n.resolve('other.en.page', 'de'))
|
141
|
+
assert_equal(nil, n.resolve('other.fr.page', nil))
|
142
|
+
assert_equal(nil, n.resolve('other.fr.page', 'en'))
|
143
|
+
end
|
144
|
+
|
145
|
+
assert_equal(nodes[:somename_en_frag], nodes[:somename_en].resolve('#othertest', 'de'))
|
146
|
+
assert_equal(nodes[:somename_en_frag], nodes[:somename_en].resolve('#othertest', nil))
|
147
|
+
assert_equal(nodes[:somename_en_fragnest], nodes[:somename_en].resolve('#nestedpath', nil))
|
148
|
+
|
149
|
+
assert_equal(nil, nodes[:root].resolve('/somename.page#othertest', nil))
|
150
|
+
assert_equal(nodes[:somename_en_frag], nodes[:root].resolve('/somename.page#othertest', 'en'))
|
151
|
+
assert_equal(nodes[:somename_de_frag], nodes[:root].resolve('/somename.page#othertest', 'de'))
|
152
|
+
assert_equal(nodes[:somename_en_frag], nodes[:root].resolve('/somename.en.page#othertest'))
|
153
|
+
assert_equal(nodes[:somename_de_frag], nodes[:root].resolve('/somename.de.page#othertest'))
|
154
|
+
|
155
|
+
assert_equal(nil, nodes[:dir2].resolve('index.html'))
|
156
|
+
assert_equal(nodes[:dir2_index_en], nodes[:dir2].resolve('index.html', 'en'))
|
157
|
+
|
158
|
+
assert_equal(nodes[:dir], nodes[:somename_en].resolve('/dir/'))
|
159
|
+
assert_equal(nodes[:root], nodes[:somename_en].resolve('/'))
|
160
|
+
end
|
161
|
+
|
162
|
+
def test_introspection
|
163
|
+
node = Webgen::Node.new(@tree.dummy_root, 'test/', 'test', {'lang' => 'de', :test => :value})
|
164
|
+
assert(node.inspect =~ /alcn=\/test/)
|
165
|
+
end
|
166
|
+
|
167
|
+
def test_changed
|
168
|
+
node = Webgen::Node.new(@tree.dummy_root, 'test/', 'test', {'lang' => 'de', :test => :value})
|
169
|
+
node.unflag(:dirty, :dirty_meta_info, :created)
|
170
|
+
|
171
|
+
calls = 0
|
172
|
+
@website.blackboard.add_listener(:node_changed?) {|n| assert(node, n); node.flag(:dirty); calls += 1}
|
173
|
+
assert(node.changed?)
|
174
|
+
assert_equal(1, calls)
|
175
|
+
assert(node.changed?)
|
176
|
+
assert_equal(1, calls)
|
177
|
+
|
178
|
+
# Test :used_nodes array checking
|
179
|
+
node.unflag(:dirty)
|
180
|
+
node.node_info[:used_nodes] << node.absolute_lcn
|
181
|
+
node.node_info[:used_nodes] << 'unknown alcn'
|
182
|
+
node.node_info[:used_nodes] << @tree.dummy_root.absolute_lcn
|
183
|
+
assert(node.changed?)
|
184
|
+
assert_equal(1, calls)
|
185
|
+
|
186
|
+
# Test :used_nodes array checking
|
187
|
+
node.unflag(:dirty)
|
188
|
+
node.node_info[:used_nodes] = Set.new
|
189
|
+
node.node_info[:used_meta_info_nodes] << node.absolute_lcn
|
190
|
+
assert(node.changed?)
|
191
|
+
assert_equal(2, calls)
|
192
|
+
node.unflag(:dirty)
|
193
|
+
node.node_info[:used_meta_info_nodes] << 'unknown alcn'
|
194
|
+
assert(node.changed?)
|
195
|
+
assert_equal(2, calls)
|
196
|
+
|
197
|
+
# Test circular depdendence
|
198
|
+
other_node = Webgen::Node.new(@tree.dummy_root, '/other', 'test.l', {'lang' => 'de', :test => :value})
|
199
|
+
other_node.flag(:dirty, :created)
|
200
|
+
node.flag(:dirty)
|
201
|
+
other_node.node_info[:used_nodes] = [node.absolute_lcn]
|
202
|
+
node.node_info[:used_nodes] = [other_node.absolute_lcn]
|
203
|
+
node.changed?
|
204
|
+
end
|
205
|
+
|
206
|
+
def test_meta_info_changed
|
207
|
+
node = Webgen::Node.new(@tree.dummy_root, '/', '/')
|
208
|
+
node.unflag(:dirty, :created)
|
209
|
+
|
210
|
+
calls = 0
|
211
|
+
@website.blackboard.add_listener(:node_meta_info_changed?) {|n| assert(node, n); node.flag(:dirty_meta_info); calls += 1}
|
212
|
+
assert(node.meta_info_changed?)
|
213
|
+
assert_equal(1, calls)
|
214
|
+
assert(node.meta_info_changed?)
|
215
|
+
assert_equal(1, calls)
|
216
|
+
end
|
217
|
+
|
218
|
+
def test_method_missing
|
219
|
+
node = Webgen::Node.new(@tree.dummy_root, 'test/', 'test', {'lang' => 'de', :test => :value})
|
220
|
+
assert_raise(NoMethodError) { node.unknown }
|
221
|
+
obj = @website.cache.instance('Object')
|
222
|
+
def obj.doit(node); :value; end
|
223
|
+
node.node_info[:processor] = 'Object'
|
224
|
+
assert_equal(:value, node.doit)
|
225
|
+
end
|
226
|
+
|
227
|
+
def test_matching
|
228
|
+
root = Webgen::Node.new(@tree.dummy_root, '/', '/')
|
229
|
+
node = Webgen::Node.new(root, 'somefile.de.html', 'somefile.html', {'lang' => 'de'})
|
230
|
+
assert(node =~ '**/*')
|
231
|
+
assert(node =~ '**/somefile.de.HTML')
|
232
|
+
assert(node =~ '/**/somefile.*.html')
|
233
|
+
assert(node !~ '/somefile.html')
|
234
|
+
assert(node !~ '**/*.test')
|
235
|
+
end
|
236
|
+
|
237
|
+
def test_absolute_name
|
238
|
+
root = Webgen::Node.new(@tree.dummy_root, '/', '/')
|
239
|
+
node = Webgen::Node.new(root, 'somepath', 'somefile.html', {'lang' => 'de'})
|
240
|
+
assert_equal('/somefile.de.html', node.absolute_lcn)
|
241
|
+
end
|
242
|
+
|
243
|
+
def test_route_to
|
244
|
+
nodes = create_default_nodes
|
245
|
+
|
246
|
+
#arg is Node
|
247
|
+
assert_equal('somename.en.html', nodes[:somename_en].route_to(nodes[:somename_en]))
|
248
|
+
assert_equal('somename.de.html', nodes[:somename_en_frag].route_to(nodes[:somename_de]))
|
249
|
+
assert_equal('file.html#frag', nodes[:dir].route_to(nodes[:dir_file_frag]))
|
250
|
+
assert_equal('#frag', nodes[:dir_file].route_to(nodes[:dir_file_frag]))
|
251
|
+
assert_equal('../dir2/index.html', nodes[:dir_file_frag].route_to(nodes[:dir2_index_en]))
|
252
|
+
assert_equal('../dir2/index.html', nodes[:dir_file].route_to(nodes[:dir2_index_en]))
|
253
|
+
|
254
|
+
assert_equal('./', nodes[:somename_en].route_to(nodes[:root]))
|
255
|
+
assert_equal('../', nodes[:dir].route_to(nodes[:root]))
|
256
|
+
assert_equal('dir/', nodes[:somename_en].route_to(nodes[:dir]))
|
257
|
+
|
258
|
+
#arg is String
|
259
|
+
assert_equal('somename.en.html', nodes[:somename_en].route_to('somename.en.html'))
|
260
|
+
assert_equal('../other.html', nodes[:dir_file].route_to('/other.html'))
|
261
|
+
assert_equal('../other', nodes[:dir_file].route_to('../other'))
|
262
|
+
assert_equal('document/file2', nodes[:dir_file_frag].route_to('document/file2'))
|
263
|
+
assert_equal('ftp://test', nodes[:dir].route_to('ftp://test'))
|
264
|
+
|
265
|
+
#test args with '..' and '.': either too many of them or absolute path given
|
266
|
+
assert_equal('../dir2', nodes[:dir_file].route_to('../../.././dir2'))
|
267
|
+
assert_equal('../file', nodes[:dir_file].route_to('/dir/../file'))
|
268
|
+
assert_equal('file', nodes[:dir_file].route_to('dir/../file'))
|
269
|
+
|
270
|
+
#arg is something else
|
271
|
+
assert_raise(ArgumentError) { nodes[:root].route_to(5) }
|
272
|
+
end
|
273
|
+
|
274
|
+
def test_routing_node
|
275
|
+
nodes = create_default_nodes
|
276
|
+
|
277
|
+
assert_equal(nodes[:somename_en], nodes[:somename_en].routing_node('en'))
|
278
|
+
|
279
|
+
assert_equal(nodes[:dir], nodes[:dir].routing_node('en'))
|
280
|
+
assert_equal(nodes[:dir2_index_en], nodes[:dir2].routing_node('en'))
|
281
|
+
assert_equal(nodes[:dir2_index_en], nodes[:dir2].routing_node('en'))
|
282
|
+
@website.cache.volatile.clear
|
283
|
+
nodes[:dir2].meta_info['index_path'] = 'unknown'
|
284
|
+
assert_equal(nodes[:dir2], nodes[:dir2].routing_node('en'))
|
285
|
+
end
|
286
|
+
|
287
|
+
def test_comparision_op
|
288
|
+
nodes = create_default_nodes
|
289
|
+
nodes[:somename_en]['title'] = 'somename'
|
290
|
+
nodes[:other_en]['title'] = 'other'
|
291
|
+
|
292
|
+
assert_equal(0, nodes[:somename_en] <=> nodes[:somename_en])
|
293
|
+
assert_equal(1, nodes[:somename_en] <=> nodes[:other_en])
|
294
|
+
assert_equal(-1, nodes[:other_en] <=> nodes[:somename_en])
|
295
|
+
nodes[:other_en]['sort_info'] = 1
|
296
|
+
assert_equal(1, nodes[:somename_en] <=> nodes[:other_en])
|
297
|
+
nodes[:other_en]['sort_info'] = '2008-06-28'
|
298
|
+
nodes[:somename_en]['sort_info'] = '2008-06-29'
|
299
|
+
assert_equal(1, nodes[:somename_en] <=> nodes[:other_en])
|
300
|
+
end
|
301
|
+
|
302
|
+
def test_level
|
303
|
+
nodes = create_default_nodes
|
304
|
+
assert_equal(0, nodes[:root].level)
|
305
|
+
assert_equal(1, nodes[:dir].level)
|
306
|
+
assert_equal(2, nodes[:dir_file].level)
|
307
|
+
assert_equal(3, nodes[:dir_file_frag].level)
|
308
|
+
end
|
309
|
+
|
310
|
+
def test_in_subtree_of
|
311
|
+
nodes = create_default_nodes
|
312
|
+
|
313
|
+
assert(nodes[:somename_en].in_subtree_of?(nodes[:root]))
|
314
|
+
assert(nodes[:dir].in_subtree_of?(nodes[:root]))
|
315
|
+
|
316
|
+
assert(nodes[:dir_file].in_subtree_of?(nodes[:dir]))
|
317
|
+
|
318
|
+
assert(nodes[:dir_file_frag].in_subtree_of?(nodes[:root]))
|
319
|
+
assert(nodes[:dir_file_frag].in_subtree_of?(nodes[:dir]))
|
320
|
+
assert(nodes[:dir_file_frag].in_subtree_of?(nodes[:dir_file]))
|
321
|
+
|
322
|
+
assert(!nodes[:dir2_index_en].in_subtree_of?(nodes[:dir]))
|
323
|
+
assert(!nodes[:somename_en].in_subtree_of?(nodes[:dir]))
|
324
|
+
assert(!nodes[:somename_en].in_subtree_of?(nodes[:dir_file]))
|
325
|
+
assert(!nodes[:dir_file].in_subtree_of?(nodes[:dir2_index_en]))
|
326
|
+
end
|
327
|
+
|
328
|
+
def test_link_to
|
329
|
+
nodes = create_default_nodes
|
330
|
+
|
331
|
+
# general tests
|
332
|
+
assert_equal('<a href="#frag">frag</a>',
|
333
|
+
nodes[:somename_en].link_to(nodes[:somename_en_frag]))
|
334
|
+
assert_equal('<a href="#frag">link_text</a>',
|
335
|
+
nodes[:somename_en].link_to(nodes[:somename_en_frag], :link_text => 'link_text'))
|
336
|
+
assert_equal('<a attr1="val1" href="#frag">frag</a>',
|
337
|
+
nodes[:somename_en].link_to(nodes[:somename_en_frag], 'attr1' => 'val1'))
|
338
|
+
assert_equal('<a href="#frag">frag</a>',
|
339
|
+
nodes[:somename_en].link_to(nodes[:somename_en_frag], :attr1 => 'val1'))
|
340
|
+
assert_equal('<a href="dir2/index.html">index</a>',
|
341
|
+
nodes[:somename_en].link_to(nodes[:dir2_index_en]))
|
342
|
+
|
343
|
+
nodes[:somename_en_frag]['link_attrs'] = {:link_text => 'Default Text', 'class'=>'help'}
|
344
|
+
assert_equal('<a attr1="val1" class="help" href="#frag">link_text</a>',
|
345
|
+
nodes[:somename_en].link_to(nodes[:somename_en_frag], :link_text => 'link_text', 'attr1' => 'val1'))
|
346
|
+
|
347
|
+
# links to directories
|
348
|
+
assert_equal('<a href="dir2/index.de.html">routed_de</a>',
|
349
|
+
nodes[:somename_de].link_to(nodes[:dir2]))
|
350
|
+
assert_equal('<a href="dir2/index.html">routed</a>',
|
351
|
+
nodes[:somename_en].link_to(nodes[:dir2]))
|
352
|
+
assert_equal('<a href="dir2/index.de.html">routed_de</a>',
|
353
|
+
nodes[:somename_en].link_to(nodes[:dir2], :lang => 'de'))
|
354
|
+
assert_equal('<span>routed</span>',
|
355
|
+
nodes[:dir2_index_en].link_to(nodes[:dir2]))
|
356
|
+
|
357
|
+
# varying the website.link_to_current_page option
|
358
|
+
@website.config['website.link_to_current_page'] = true
|
359
|
+
assert_equal('<a class="help" href="#frag">Default Text</a>',
|
360
|
+
nodes[:somename_en_frag].link_to(nodes[:somename_en_frag]))
|
361
|
+
@website.config['website.link_to_current_page'] = false
|
362
|
+
assert_equal('<span class="help">Default Text</span>',
|
363
|
+
nodes[:somename_en_frag].link_to(nodes[:somename_en_frag]))
|
364
|
+
end
|
365
|
+
|
366
|
+
|
367
|
+
end
|