diff --git a/.gitignore b/.gitignore index eb0a0b1..d793de9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +#test result +result/* #vim session files *.vims diff --git a/tests/control/dir/collatz.py b/tests/control/dir/collatz.py new file mode 100755 index 0000000..073528a --- /dev/null +++ b/tests/control/dir/collatz.py @@ -0,0 +1,16 @@ + +def nextInSequence(number): + if isinstance(number, int): + if number % 2 == 0: + return number // 2 + else: + return 3*number+1 + else: + raise TypeError('input must be int!') + +def seqenceLength(number): + length = 0 + while number != 1: + number = nextInSequence(number) + length += 1 + return length diff --git a/tests/control/dir/subdir/linked.html b/tests/control/dir/subdir/linked.html new file mode 100644 index 0000000..1a4a433 --- /dev/null +++ b/tests/control/dir/subdir/linked.html @@ -0,0 +1,496 @@ + + + + + + + + +relatively linked doc + + + + + +
+
+
+Stand By +
+
Figure 1. Technical Difficulties
+
+
+
+While the creative works from the 16th century can still be accessed and used by others, the data in some software programs from the 1990s is already inaccessible. Once a company that produces a certain product goes out of business, it has no simple way to uncover how its product encoded data. The code is thus lost, and the software is inaccessible. Knowledge has been destroyed. +
+
+— Lawrence Lessig
+May the Source Be With You +
+
+
+
Three Rings for the Elven-kings under the sky,
+Seven for the dwarf-lords in their halls of stone,
+Nine for Mortal Men doomed to die,
+One for the Dark Lord on his dark throne,
+In the Land of Mordor where the Shadows lie.
+One Ring to rule them all, One Ring to find them,
+One Ring to bring them all and in the darkness bind them
+In the Land of Mordor where the Shadows lie.
+
+— J.R.R. Tolkien
+The Fellowship of the Ring +
+
+
+

https://git.venberg.xyz/Gabe/adocStaticSiteGen

+
+
+
A mechanical marvel
+
+ +
+
+
+

back to where you came!

+
+
+ + + \ No newline at end of file diff --git a/tests/control/images/test_pattern.svg b/tests/control/images/test_pattern.svg new file mode 100644 index 0000000..7e86992 --- /dev/null +++ b/tests/control/images/test_pattern.svg @@ -0,0 +1,2495 @@ + + + + + + + + image/svg+xml + + Carta de Ajuste + 11/JUN/08 + + + EBNZ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/control/landing_page.html b/tests/control/landing_page.html new file mode 100644 index 0000000..3aaf826 --- /dev/null +++ b/tests/control/landing_page.html @@ -0,0 +1,935 @@ + + + + + + + + +test page for an adoc static site generator. + + + + + + +
+
+
+
+ + + + + +
+ + +Test the links in this page! +
+
+
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. +Phasellus mi tellus, suscipit in dolor nec, faucibus aliquam nulla. +Mauris gravida, felis commodo molestie tincidunt, sem erat varius lorem, nec lobortis eros sem ut augue. +Donec suscipit tristique imperdiet. +Sed maximus est ultrices urna imperdiet, vitae facilisis eros posuere. +Quisque a mollis mauris. +Pellentesque fermentum, libero sed sollicitudin interdum, dolor nunc euismod purus, et laoreet tellus augue vitae turpis. +Pellentesque condimentum elit quis semper tincidunt. +Nullam consectetur euismod accumsan. +In dictum nibh ut iaculis euismod. +Phasellus ut nibh non ipsum volutpat cursus. +Sed eleifend, enim vitae ultrices auctor, dolor ipsum molestie dui, id dignissim massa neque a mauris.

+
+
+
+
+

inline formatting tests

+
+
+

bold test

+
+
+

italics test

+
+
+

'monospace test'

+
+
+

'monospace bold test'

+
+
+

'monospace italic test'

+
+
+

*italic bold test*

+
+
+

'all three test'

+
+
+

*escaped bold test*

+
+
+

underline test using html passthrough test

+
+
+

*escaped bold test with plus*

+
+
+

→ ⇒ ← ⇐

+
+
+

==colapsable block

+
+
+Details +
+
+

== list tests

+
+
+
unordered list test
+
    +
  • +

    Lorum

    +
  • +
  • +

    ipsum

    +
    +
      +
    • +

      dolor

      +
    • +
    • +

      sit

      +
      +
        +
      • +

        amet

        +
      • +
      +
      +
    • +
    • +

      consectetur

      +
    • +
    +
    +
  • +
+
+
+
ordered list test.
+
    +
  1. +

    Lorum

    +
  2. +
  3. +

    ipsum

    +
    +
      +
    1. +

      dolor

      +
    2. +
    3. +

      sit

      +
      +
        +
      1. +

        amet

        +
      2. +
      +
      +
    4. +
    5. +

      consectetur

      +
    6. +
    +
    +
  4. +
+
+
+
reversed ordered list test.
+
    +
  1. +

    Lorum

    +
  2. +
  3. +

    ipsum

    +
    +
      +
    1. +

      dolor

      +
    2. +
    3. +

      sit

      +
      +
        +
      1. +

        amet

        +
      2. +
      +
      +
    4. +
    5. +

      consectetur

      +
    6. +
    +
    +
  4. +
+
+
+
mixed list
+
    +
  1. +

    Lorum

    +
  2. +
  3. +

    ipsum

    +
    +
      +
    • +

      dolor

      +
    • +
    • +

      sit

      +
      +
        +
      • +

        amet

        +
      • +
      +
      +
    • +
    +
    +
  4. +
  5. +

    consectetur

    +
    +
      +
    • +

      adipiscing

      +
    • +
    • +

      elit

      +
    • +
    +
    +
  6. +
+
+
+
+
+
math test
+

\(\frac{\frac{1}{x}+\frac{1}{y}}{y-z}\)

+
+
+
+\$[[a,b\],[c,d\]\]((n),(k))\$ +
+
+
+
description list test
+ + + + + + + + + + + + + +
+test + +

to make sure software works correctly

+
+git + +

a gift from the machine spirits

+
+printers + +

the greatest evil to ever befall IT.

+
+
+
+
+
+ +
+
+

Lets go back to the [list tests] or to the tables

+
+ +
+
+Stand By +
+
Figure 1. Technical Difficulties
+
+
+

link!

+
+
+

xref!

+
+
+
Source code test
+
+
def nextInSequence(number):
+    if isinstance(number, int):
+        if number % 2 == 0:
+            return number // 2
+        else:
+            return 3*number+1
+    else:
+        raise TypeError('input must be int!')
+
+def seqenceLength(number):
+    length = 0
+    while number != 1:
+        number = nextInSequence(number)
+        length += 1
+    return length
+
+
+
+
+
+

tables test

+
+ +++++ + + + + + + + + + + + + + + + + + + + +
NameGroupDescription

Firefox

Web Browser

+

Mozilla Firefox is an open-source web browser. +It’s designed for:

+
+
+
    +
  • +

    standards compliance,

    +
  • +
  • +

    performance and

    +
  • +
  • +

    portability.

    +
  • +
+

Ruby

Programming Language

A programmer’s best friend.

+
+
+
+

included section

+
+
+

Fusce maximus nec magna eu ultricies. +Fusce quis tellus vitae arcu facilisis lobortis. +Donec id erat at enim porta placerat in vitae sapien. +Duis justo arcu, hendrerit nec nulla eu, dictum dapibus ipsum. +Sed fermentum id elit eget fringilla. +Suspendisse volutpat imperdiet justo, ut efficitur odio maximus et. +Nunc interdum sollicitudin eros sit amet convallis. +Praesent volutpat tempus metus id tincidunt. +Proin aliquet justo a fermentum consectetur. +Nunc scelerisque, nisi id scelerisque dictum, nibh lectus ultrices nunc, quis ultricies erat velit sit amet urna. +Maecenas orci felis, volutpat at bibendum ut, mattis eu justo.

+
+
+

blocks

+
+
listing block
+
+
example of _listing block_
+with verbatim line break
+
+
+
+
Example 1. example block
+
+
+

example block +with line break

+
+
+
+
+
literal block
+
+
_literal_ block
+with line break
+
+
+pass block +with underlined text +
+
quote block
+
+
+

quote block +with line break

+
+
+
+
+
+
sidebar block
+
+

sidebar block +with line break

+
+
+
+
+ + + + + +
+ + +
+

This is an example of an admonition block.

+
+
+

Unlike an admonition paragraph, it may contain any AsciiDoc content. +The style can be any one of the admonition labels:

+
+
+
    +
  • +

    NOTE

    +
  • +
  • +

    TIP

    +
  • +
  • +

    WARNING

    +
  • +
  • +

    CAUTION

    +
  • +
  • +

    IMPORTANT

    +
  • +
+
+
+
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/tests/test.sh b/tests/test.sh index f379168..f704c8a 100644 --- a/tests/test.sh +++ b/tests/test.sh @@ -1,2 +1,15 @@ rm -r result -../ASCIIsite.py --output result --exclude-file globignore test +../ASCIIsite.py --verbose --output result --exclude-file globignore test +#find the sha1sum of the output +cd result +result=$(find . -type f -print0 | xargs -0 -P0 -n1 md5sum | sort -k 2 | md5sum) +cd ../control +control=$(find . -type f -print0 | xargs -0 -P0 -n1 md5sum | sort -k 2 | md5sum) +cd ../ +echo result sum is $result +echo control sum is $control +if [ "$result" = "$control" ]; then + echo test passed! +else + echo test did not pass!!!!! +fi