@@ -97,7 +97,7 @@ func TestAsciidoctorDisallowedArgs(t *testing.T) {
9797 mconf := markup_config .Default
9898 mconf .AsciidocExt .Backend = "disallowed-backend"
9999 mconf .AsciidocExt .Extensions = []string {"./disallowed-extension" }
100- mconf .AsciidocExt .Attributes = map [string ]string {"outdir" : "disallowed-attribute" }
100+ mconf .AsciidocExt .Attributes = map [string ]any {"outdir" : "disallowed-attribute" }
101101 mconf .AsciidocExt .SafeMode = "disallowed-safemode"
102102 mconf .AsciidocExt .FailureLevel = "disallowed-failurelevel"
103103
@@ -267,6 +267,8 @@ trace = false
267267[markup.asciidocext.attributes]
268268my-base-url = "https://gohugo.io/"
269269my-attribute-name = "my value"
270+ my-attribute-true = true
271+ my-attribute-false = false
270272` )
271273 conf := testconfig .GetTestConfig (nil , cfg )
272274 p , err := asciidocext .Provider .New (
@@ -286,15 +288,21 @@ my-attribute-name = "my value"
286288 expectedValues := map [string ]bool {
287289 "my-base-url=https://gohugo.io/" : true ,
288290 "my-attribute-name=my value" : true ,
291+ "my-attribute-true" : true ,
292+ "'!my-attribute-false'" : true ,
289293 }
290294
291295 args := ac .ParseArgs (converter.DocumentContext {})
292- c .Assert (len (args ), qt .Equals , 5 )
296+ c .Assert (len (args ), qt .Equals , 9 )
293297 c .Assert (args [0 ], qt .Equals , "-a" )
294298 c .Assert (expectedValues [args [1 ]], qt .Equals , true )
295299 c .Assert (args [2 ], qt .Equals , "-a" )
296300 c .Assert (expectedValues [args [3 ]], qt .Equals , true )
297- c .Assert (args [4 ], qt .Equals , "--no-header-footer" )
301+ c .Assert (args [4 ], qt .Equals , "-a" )
302+ c .Assert (expectedValues [args [5 ]], qt .Equals , true )
303+ c .Assert (args [6 ], qt .Equals , "-a" )
304+ c .Assert (expectedValues [args [7 ]], qt .Equals , true )
305+ c .Assert (args [8 ], qt .Equals , "--no-header-footer" )
298306}
299307
300308func getProvider (c * qt.C , mConfStr string ) converter.Provider {
0 commit comments