Test output broken when strings contain newlines

オープン
#1,626 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
java, typescript, vscode

調査の方向性

説明されている runner と VS Code のバージョンを使って、改行を含む文字列で assertEquals のケースを再現し、plugin の出力とコマンドラインの出力を比較します。runner が失敗テキストをどのようにパースするかを追跡します。壊れた角括弧がなくなり、通常の diff ビューが表示されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

ai-triaged bug help wanted investigating junit low-priority test-reporting

It looks like something is wrong with the parsing of test failures when strings contain newlines.

If I do:
assertEquals("if (x < 3){\n", "if (x < 3) {\n");

I get strange brackets in the output, and the plugin doesn't display the diff view that I normally get:

org.opentest4j.AssertionFailedError: expected: [if (x [ 3){
] but was: [if (x [ 3) {
]

At the command line, this works. I get:

expected:<if (x < 3)[]{
> but was:<if (x < 3)[ ]{
>

This is on MacOS 13.6, v0.40.0 of the runner, and vscode 1.83.1

主要言語
TypeScript
スター
340
フォーク
173
平均マージ
1日 2時間
マージ済み PR(30日)
17

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/vscode-java-test のほかの issue

microsoft/vscode-java-test の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。