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:
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user