diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-13 16:08:13 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-13 16:08:13 -0500 |
| commit | 6d8281876ab95616b6823f74fdd2a61d5aead1c7 (patch) | |
| tree | 3e9a5c17aa9ccbc220ea82c312d55822f7733753 /scripts/theme-studio/test-columns.mjs | |
| parent | b26bee1a876da2d92630d515f0462be51c429dad (diff) | |
| download | dotemacs-6d8281876ab95616b6823f74fdd2a61d5aead1c7.tar.gz dotemacs-6d8281876ab95616b6823f74fdd2a61d5aead1c7.zip | |
Group numeric color names by stem
Diffstat (limited to 'scripts/theme-studio/test-columns.mjs')
| -rw-r--r-- | scripts/theme-studio/test-columns.mjs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/theme-studio/test-columns.mjs b/scripts/theme-studio/test-columns.mjs index 6079966a2..ab88cb737 100644 --- a/scripts/theme-studio/test-columns.mjs +++ b/scripts/theme-studio/test-columns.mjs @@ -57,6 +57,14 @@ test('columnsFromPalette: Boundary - explicit color-N column ids are preserved', assert.deepEqual(columns[0].members.map(m => m.name), ['color-22', 'color-23']); }); +test('columnsFromPalette: Boundary - external numeric color names group by text stem', () => { + const pal = [['#0000ee', 'blue1'], ['#0000cd', 'blue2'], ['#bebebe', 'grey80'], ['#c0c0c0', 'grey81'], ['#cd69c9', 'orchid3']]; + const { columns } = columnsFromPalette(pal, { bg: '#000000', fg: '#ffffff' }); + assert.deepEqual(columns.map(f => f.column), ['blue', 'grey', 'orchid']); + assert.deepEqual(columnOf(columns, 'blue1').members.map(m => m.name), ['blue1', 'blue2']); + assert.deepEqual(columnOf(columns, 'grey80').members.map(m => m.name), ['grey80', 'grey81']); +}); + test('columnsFromPalette: Normal - palette order controls column order', () => { const pal = [['#67809c', 'blue'], ['#e8bd30', 'gold'], ['#5d9b86', 'green']]; const { columns } = columnsFromPalette(pal, { bg: '#000000', fg: '#ffffff' }); |
