I just tested this and <excludefromscan> worked fine with either of these <regexp> for a SMB music source:
Code:
<regexp>smb://HOST-COMPUTER/Music/foldername to be excluded/</regexp>
or
Code:
<regexp>foldername to be excluded</regexp>
Just to be clear: If you had inadvertantly scanned items into your music library from your "Test" folder due to your typo of "<excluedfromscan>", then those items will remain in your library even if you subsequently corrected your advancedsettings.xml and rescanned your library. In other words, items already in the library will not be removed by a subsequent <excludefromscan> entry.
You will have to do something like renaming that folder (e.g., from "Test" to "Test-hold") on the NAS, running Audio "Clean library" on your XBMC system to get rid of that now "non-existent" folder's items from the library, renaming that folder on the NAS back to its original name, and then running an update library on your XBMC system to verify that the folder is now excluded from scanning.