Add unit test for greedy template replacement
Merge pull request #2502 from ahocevar/template-test

Add unit test for greedy template replacement