1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-09-01 22:12:46 +00:00
TiddlyWiki5/editions/test/tiddlers/tests/data/filters/fake-variables.tid
Rob Hoelz 24dbf69180
Fix [is[variable]] operator doesn't work for "fake" variables #6303 (#6996)
* Add tests for [is[variable]] and "faked" variables

See GH #6303

* Make is[variable] and variables[] operators resilient to fake widgets

Co-authored-by: jeremy@jermolene.com <jeremy@jermolene.com>
2022-10-18 17:08:04 +01:00

27 lines
947 B
Plaintext

title: Filters/FakeVariables
description: Test for https://github.com/Jermolene/TiddlyWiki5/issues/6303
type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]]
title: Output
\whitespace trim
<$list variable="var" filter="[[existing variable should have output]] :filter[[..currentTiddler]is[variable]]">
<p><<var>></p>
</$list>
<$list variable="var" filter="[[non-existing variable should not have output]] :filter[[nonExistingVariable]is[variable]]">
<p><<var>></p>
</$list>
<$list variable="var" filter="[[existing variable negated should not have output]] :filter[[..currentTiddler]!is[variable]]">
<p><<var>></p>
</$list>
<$list variable="var" filter="[[non-existing variable negated should have output]] :filter[[nonExistingVariable]!is[variable]]">
<p><<var>></p>
</$list>
+
title: ExpectedResult
<p><p>existing variable should have output</p></p><p></p><p></p><p><p>non-existing variable negated should have output</p></p>