NOTE: that not adding #testlistend in the #testlist will result in pmwiki not responding.
Don't do this. Indeed, when you define
fmt=#template, PmWiki will extract the text between
[[#template]] and the next
[[#anchor]] in the page, or the end of the page, whichever comes first. In your case, your template starts from
[[#testlist]] until the end of the page, and it will be evaluated for every page in the pagelist. When your template contains the same pagelist, repeated for every page, it gets into an infinite loop. Even if you only have a single page. Again, don't do this. --Petko
I have moved the template after the pagelist, and removed the closing anchor. See how it includes the text to the end of the page in the listings, but since this text doesn't contain a pagelist, it doesn't create an infinite loop and doesn't hang or crash. --Petko