This commit adds tests to ensure proper formatting of the tooltip string so as to prevent bugs like the one fixed by 7ca4a929.
7ca4a929