Cover LineDiff's CRLF, removal-only and large-diff branches
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 90/100
Direzione di ricerca
Leggi src/Prompuff.Application/Services/LineDiff.cs nella parte relativa al fallback e a SplitLines, quindi aggiungi i tre test dei rami a tests/Prompuff.Application.Tests/LineDiffTests.cs. Esegui dotnet test tests/Prompuff.Application.Tests. Il lavoro è completato quando i casi CRLF, testo nullo e fallback di 2.001 righe verificano i conteggi, i tipi, l’ordine e i numeri di riga specificati per le modifiche.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The History tab's diff comes from LineDiff. Its tests cover additions, edits and identical texts, but three branches have no test:
SplitLinesturns\r\ninto\n, so a body with Windows line endings and the same body with LF endings should show no changes.- When the new text is empty or null, every old line is
Removed. - When the changed middle is bigger than
MaxTableCells(4,000,000 cells, so more than about 2,000 lines on each side), it skips the LCS table and lists every old line as removed, then every new line as added.
What to do
Add a test for each branch to LineDiffTests. For the large one, build two texts of 2,001 lines that share no line, such as a0…a2000 and b0…b2000, and check kinds, order and line numbers, not only the counts. Tests only; don't change LineDiff.
Where to look
src/Prompuff.Application/Services/LineDiff.cs: the fallback at line 58,SplitLinesat line 117.tests/Prompuff.Application.Tests/LineDiffTests.cs.
Done when
-
"a\r\nb"against"a\nb"gives onlyUnchangedlines, andCountChangesis(0, 0). -
CountChanges("a\nb", null)is(0, 2), andComputemarks both linesRemovedwith old line numbers 1 and 2. - The large-diff test checks that all 2,001
Removedlines come before the 2,001Addedlines, with the right line numbers. - Nothing under
src/changes.
Testing it
dotnet test tests/Prompuff.Application.Tests
- Lingua principale
- C#
- Stelle
- 0
- Fork
- 1
- Merge medio
- 1h 51m
- PR unite (30g)
- 13
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di hazeliscoding/prompuff
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
hazeliscoding/prompuff#34 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
hazeliscoding/prompuff#22 ·
I maintainer di solito rispondono entro 1 giorno
-
good first issue
Difficoltà 1/5 1-3 ore Idoneità per principianti 92/100
hazeliscoding/prompuff#13 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
hazeliscoding/prompuff#12 ·
I maintainer di solito rispondono entro 1 giorno
-
TranslationsApertaenhancement later
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
hazeliscoding/prompuff#62 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di hazeliscoding/prompuff
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
KnifeLemon/Filee#363 ·
I maintainer di solito rispondono entro 1 giorno
-
[CI] .trgen-ignore required for several grammars.Forse già presa @kaby76 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
antlr/grammars-v4#5073 ·
I maintainer di solito rispondono entro 1 giorno
-
/api/oauth/introspect emits clientId and tokenType instead of RFC 7662's client_id and token_typeApertabug P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
nightscout/nocturne#2317 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG]: Position intent set on a simple order is dropped when it becomes a bracket, OCO or OTO orderForse già presa @RaphaelFakhri l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
alpacahq/alpaca-trade-api-csharp#903 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
joinrpg/joinrpg-net#5752 ·
I maintainer di solito rispondono entro 1 giorno