mirror of
https://github.com/apple/pkl.git
synced 2026-03-23 17:41:10 +01:00
Correctly handle EOF after unmatched backtick (#1187)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -64,4 +64,11 @@ class ReplMessagesTest {
|
||||
startIndex = examples.indexOf("```", endIndex + 3)
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `handle single backtick`() {
|
||||
val responses = server.handleRequest(ReplRequest.Eval("1", "`", true, true))
|
||||
assertThat(responses.size).isEqualTo(1)
|
||||
assertThat(responses).hasOnlyElementsOfType(ReplResponse.EvalError::class.java)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user