Skip to content

Commit

Permalink
#314 Missing test files added
Browse files Browse the repository at this point in the history
  • Loading branch information
ruhrotht authored and ruhrotht committed Sep 30, 2024
1 parent 45a8d43 commit 5448e7a
Show file tree
Hide file tree
Showing 4 changed files with 1,384 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
= Test File for HTML Sanity Check


== Image Directory Setting
Via the following directive, the image directory is set to "./images":

----
:imagesdir: ./images
----
:imagesdir: ./images


== What is tested here

This file serves as _smoketest_ for kbd:[htmlSC], as it deliberately forces
the (asciidoc) html generator to create the following errors within the html
output:

* Broken cross reference (missing link target for internal link). See section <<Cross-References>>.
* <<Missing-Images>>
* <<Duplicate-Id>> (dupliate link target)
* Missing local resource (missing link to local file)



== Cross-References, a.k.a. _Internal Links_


* A link to the subheading below: <<aim42, title>>.
* A second link, but <<24mia, misspelled>>


This plugin has been created in context of the <<aim42>> project


[[aim42]]
=== aim42 Architecture Improvement


[[Missing-Images]]
== Missing Images
One image from the image directory - created with this asciidoc:
----
image::aim42.png["alternate-text", title="aim42-logo", width="150"]
----

image::aim42.png["alternate-text", title="aim42-logo", width="150"]


=== A Missing Image

Another image tag - but this image (with the strange name)
does not exist in the file system:
----
image::missing-image-urjk8ybepw8.jpg["missing...", title="missing-image"]
----
image::missing-image-urjk8ybepw8.jpg["missing...", title="missing-image"]

=== A data:image

In this case, an inline image (data:uri) is generated by setting the switch `:data-uri:`

:data-uri:

image::aim42.png["alternate-text", title="aim42-logo", width="150"]

image::missing-image-urjk8ybepw8.jpg["alternate-text", title="aim42-logo", width="150"]

The resulting image is fully contained within the generated HTML and thus needs no additional check.

[[Duplicate-Id]]
== Duplicate ID's or Bookmarks

In Asciidoc, ID's are defined using double brackets
----
[[some-anchor]]
----
One can <<some-anchor, reference>> those id's/bookmarks
with <<some-anchor>> directive in asciidoc.

[[some-anchor]]
In this section, we define this id:
....
[[some-anchor]]
....

for the first time.
Where will the browser jump to, if we <<some-anchor, click here?>>


[[some-anchor]]
=== Second definition
In this section, we define it the second time.


== External Links
(to be done)
Loading

0 comments on commit 5448e7a

Please sign in to comment.