Skip to content

Commit

Permalink
1 task from lesson 7 are done (Attempt Kotlin-Polytech#2).
Browse files Browse the repository at this point in the history
  • Loading branch information
Iksburg committed Nov 3, 2020
1 parent 6147fe0 commit 6f5888b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
7 changes: 1 addition & 6 deletions input/delete_in1.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
_ Не надо начинать с этой строки.
Задачи _надо_ решать правильно,
_хотя очень хочется решить их быстро и неправильно,

и не надо при этом никуда торопиться___
_ А я всё равно решил задачу неправильно.
ЩЫ, Щы Щы -
2 changes: 1 addition & 1 deletion src/lesson7/task1/Files.kt
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ fun deleteMarked(inputName: String, outputName: String) {
continue
}
}
for (word in line.split(Regex("\\s+"))) {
for (word in line.split(" ")) {
if (currentLineLength != 0) {
writer.write(" ")
}
Expand Down
1 change: 1 addition & 0 deletions temp.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ЩЫ, Щы Щы -
4 changes: 1 addition & 3 deletions test/lesson7/task1/Tests.kt
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ Basic, Ruby, Swift.
deleteMarked("input/delete_in1.txt", "temp.txt")
assertFileContent(
"temp.txt",
"""Задачи _надо_ решать правильно,
и не надо при этом никуда торопиться___
"""ЩЫ, Щы Щы -
""".trimIndent()
)
File("temp.txt").delete()
Expand Down

0 comments on commit 6f5888b

Please sign in to comment.