From 838c4639a0450699290496ec99712983752a428e Mon Sep 17 00:00:00 2001 From: pmario Date: Tue, 16 Apr 2024 11:55:01 +0200 Subject: [PATCH] add test tiddlers for easy testing --- .../tiddlers/Draft of 'test-collatz'.tid | 25 +++++++++++++++++++ .../Draft of 'test-recursive button'.tid | 11 ++++++++ .../tiddlers/system/DefaultTiddlers.tid | 6 ++--- editions/tw5.com/tiddlers/test-collatz.tid | 23 +++++++++++++++++ .../tiddlers/test-recursive button.tid | 9 +++++++ 5 files changed, 70 insertions(+), 4 deletions(-) create mode 100644 editions/tw5.com/tiddlers/Draft of 'test-collatz'.tid create mode 100644 editions/tw5.com/tiddlers/Draft of 'test-recursive button'.tid create mode 100644 editions/tw5.com/tiddlers/test-collatz.tid create mode 100644 editions/tw5.com/tiddlers/test-recursive button.tid diff --git a/editions/tw5.com/tiddlers/Draft of 'test-collatz'.tid b/editions/tw5.com/tiddlers/Draft of 'test-collatz'.tid new file mode 100644 index 000000000..8284781ac --- /dev/null +++ b/editions/tw5.com/tiddlers/Draft of 'test-collatz'.tid @@ -0,0 +1,25 @@ +created: 20240415102801809 +draft.of: test-collatz +draft.title: test-collatz +modified: 20240416094922377 +tags: +title: Draft of 'test-collatz' +type: text/vnd.tiddlywiki + +\procedure collatz(n) +<% if [match[1]] %> + 1 +<% elseif [remainder[2]match[1]] %> + <> <$button>→ <$transclude $variable="collatz" n = {{{ [multiply[3]add[1]] }}}/> +<% else %> + <> <$button>→ <$transclude $variable="collatz" n = {{{ [divide[2]] }}}/> +<% endif %> +\end + +\procedure test(x:10) +<$let tv-UNSAFE-max-widget-tree-depth="2000"> +<$transclude $variable=collatz n=<>/> + +\end + +<> diff --git a/editions/tw5.com/tiddlers/Draft of 'test-recursive button'.tid b/editions/tw5.com/tiddlers/Draft of 'test-recursive button'.tid new file mode 100644 index 000000000..eb4eae673 --- /dev/null +++ b/editions/tw5.com/tiddlers/Draft of 'test-recursive button'.tid @@ -0,0 +1,11 @@ +created: 20240415124530887 +draft.of: test-recursive button +draft.title: test-recursive button +modified: 20240416094919710 +tags: +title: Draft of 'test-recursive button' +type: text/vnd.tiddlywiki + +<$button> +<$transclude/> + \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/system/DefaultTiddlers.tid b/editions/tw5.com/tiddlers/system/DefaultTiddlers.tid index e10c566b9..28ba29f04 100644 --- a/editions/tw5.com/tiddlers/system/DefaultTiddlers.tid +++ b/editions/tw5.com/tiddlers/system/DefaultTiddlers.tid @@ -1,8 +1,6 @@ created: 20131127215321439 -modified: 20140912135951542 +modified: 20240416092903807 title: $:/DefaultTiddlers type: text/vnd.tiddlywiki -HelloThere -GettingStarted -Community +[list[$:/StoryList]] \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/test-collatz.tid b/editions/tw5.com/tiddlers/test-collatz.tid new file mode 100644 index 000000000..0ba4ce423 --- /dev/null +++ b/editions/tw5.com/tiddlers/test-collatz.tid @@ -0,0 +1,23 @@ +created: 20240415102801809 +modified: 20240416092855340 +tags: +title: test-collatz +type: text/vnd.tiddlywiki + +\procedure collatz(n) +<% if [match[1]] %> + 1 +<% elseif [remainder[2]match[1]] %> + <> <$button>→ <$transclude $variable="collatz" n = {{{ [multiply[3]add[1]] }}}/> +<% else %> + <> <$button>→ <$transclude $variable="collatz" n = {{{ [divide[2]] }}}/> +<% endif %> +\end + +\procedure test(x:10) +<$let tv-UNSAFE-max-widget-tree-depth="2000"> +<$transclude $variable=collatz n=<>/> + +\end + +<> diff --git a/editions/tw5.com/tiddlers/test-recursive button.tid b/editions/tw5.com/tiddlers/test-recursive button.tid new file mode 100644 index 000000000..ee33a2504 --- /dev/null +++ b/editions/tw5.com/tiddlers/test-recursive button.tid @@ -0,0 +1,9 @@ +created: 20240415124530887 +modified: 20240416092728701 +tags: +title: test-recursive button +type: text/vnd.tiddlywiki + +<$button> +<$transclude/> + \ No newline at end of file