Fix issue where custom separator could be the same as a character in the prefix

This commit is contained in:
Alan Grainger
2026-10-20 09:28:04 +13:00
parent 94cfa9972b
commit fc7670157b
11 changed files with 36 additions and 35 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ describe('upload options', () => {
it('takes a usable field separator, and falls back for one that could be part of a field', () => {
setConfig({ ipp: { upload: { fieldSeparator: '^' } } })
expect(fieldSeparator()).toBe('^')
for (const bad of ['', '-', 'a', '.', ' ', '/', 7, null]) {
for (const bad of ['', '-', 'a', '.', ' ', '/', '^^', '_', 7, null]) {
setConfig({ ipp: { upload: { fieldSeparator: bad } } })
expect(fieldSeparator()).toBe(',')
}