Cover LineDiff's CRLF, removal-only and large-diff branches
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 90/100
Línea de trabajo
Lee src/Prompuff.Application/Services/LineDiff.cs en torno al fallback y a SplitLines, y luego añade las tres pruebas de ramas a tests/Prompuff.Application.Tests/LineDiffTests.cs. Ejecuta dotnet test tests/Prompuff.Application.Tests. El trabajo estará terminado cuando los casos de CRLF, texto nulo y fallback de 2.001 líneas verifiquen las cantidades, los tipos, el orden y los números de línea especificados para los cambios.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- C#
- Estrellas
- 0
- Forks
- 1
- Merge medio
- 1 h 21 min
- PR fusionados (30 d)
- 22
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de hazeliscoding/prompuff
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
hazeliscoding/prompuff#34 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
hazeliscoding/prompuff#22 ·
Los mantenedores suelen responder en 1 día
-
good first issue
Dificultad 1/5 1-3 horas Aptitud para principiantes 92/100
hazeliscoding/prompuff#13 ·
Los mantenedores suelen responder en 1 día
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
hazeliscoding/prompuff#12 ·
Los mantenedores suelen responder en 1 día
-
TranslationsAbiertoenhancement later
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
hazeliscoding/prompuff#62 ·
Los mantenedores suelen responder en 1 día
Todos los issues de hazeliscoding/prompuff
Issues similares
-
clawsweeper:fix-shape-clear clawsweeper:needs-maintainer-review clawsweeper:no-new-fix-pr clawsweeper:not-repro-on-main impact:ux-release-blocker issue-rating: 🦪 silver shellfish P0
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
openclaw/openclaw-windows-node#1843 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
-
kind:ux size:S type:bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
elsa-workflows/elsa-foundation#3256 ·
Los mantenedores suelen responder en 1 día
-
[Bug]: Revit selector reads process ids 2000-2099 as years (flaky AgentClientTests.AYearOrAProcessIdSelectsTheHost)Posiblemente ocupada @Wurschdhaud la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
pyrevitlabs/pyRevit#3817 ·
Los mantenedores suelen responder en 1 día
-
bug effort:S P2
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
nightscout/nocturne#2449 ·
Los mantenedores suelen responder en 1 día