Move extendedAttributes function to TestUtils so it can be used by InputHandler.test.ts.

This is a followup to pull request #5748.
It removes the remaining test uses of internal _extendedAttrs.
This commit is contained in:
Per Bothner
2026-03-22 20:53:13 -07:00
parent 1432e20082
commit 2d9b21f5c7
3 changed files with 16 additions and 16 deletions
+2 -8
View File
@@ -5,10 +5,10 @@
import { NULL_CELL_CHAR, NULL_CELL_WIDTH, NULL_CELL_CODE, DEFAULT_ATTR, Content, UnderlineStyle, BgFlags, Attributes, FgFlags } from 'common/buffer/Constants';
import { BufferLine } from 'common/buffer//BufferLine';
import { CellData } from 'common/buffer/CellData';
import { CharData, IBufferLine, IExtendedAttrs } from '../Types';
import { CharData, IBufferLine } from '../Types';
import { assert } from 'chai';
import { AttributeData } from 'common/buffer/AttributeData';
import { createCellData, NULL_CELL_DATA } from 'common/TestUtils.test';
import { createCellData, NULL_CELL_DATA, extendedAttributes } from 'common/TestUtils.test';
class TestBufferLine extends BufferLine {
@@ -25,12 +25,6 @@ class TestBufferLine extends BufferLine {
}
}
function extendedAttributes(line: IBufferLine, index: number): IExtendedAttrs | undefined {
const cell = new CellData();
line.loadCell(index, cell);
return cell.hasExtendedAttrs() !== 0 ? cell.extended : undefined;
}
describe('AttributeData', () => {
describe('extended attributes', () => {
it('hasExtendedAttrs', () => {