Skip to content

Commit

Permalink
Fix: Ensure completion tests are testing last characters on blocks
Browse files Browse the repository at this point in the history
The tests would not detect that completion was broken when the cursor was on the last character of a Python or Bash région (it has been fixed in the previous commit). Now it should.
  • Loading branch information
idillon-sfl committed Feb 2, 2024
1 parent 30302ce commit 682e7bc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
DESCRIPTION = 'FOO'

python do_foo(){
print('123')
pri
}

do_bar(){
echo '123'
ech
}

DESCRIP
6 changes: 3 additions & 3 deletions integration-tests/src/tests/completion.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,19 @@ suite('Bitbake Completion Test Suite', () => {
}

test('Completion appears properly on bitbake variable', async () => {
const position = new vscode.Position(0, 2)
const position = new vscode.Position(8, 7)
const expected = 'DESCRIPTION'
await testCompletion(position, expected)
}).timeout(BITBAKE_TIMEOUT)

test('Completion appears properly on embedded python', async () => {
const position = new vscode.Position(3, 6)
const position = new vscode.Position(1, 7)
const expected = 'print'
await testCompletion(position, expected)
}).timeout(BITBAKE_TIMEOUT)

test('Completion appears properly on embedded bash', async () => {
const position = new vscode.Position(7, 6)
const position = new vscode.Position(5, 7)
const expected = 'echo'
await testCompletion(position, expected)
}).timeout(BITBAKE_TIMEOUT)
Expand Down

0 comments on commit 682e7bc

Please sign in to comment.