Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
bcpeinhardt committed Oct 25, 2024
1 parent 2fab9de commit 530126b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gsv/internal/ast.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ fn parse_p(
[curr_line, ..previously_parsed_lines]
->
parse_p(remaining_tokens, InsideEscapedString, [
["", ..curr_line],
[""],
curr_line,
..previously_parsed_lines
])

Expand Down
13 changes: 13 additions & 0 deletions test/gsv_test.gleam
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import gleam/dict
import gleam/int
import gleam/io
import gleam/list
import gleam/result
import gleam/string
Expand Down Expand Up @@ -234,3 +235,15 @@ pub fn dicts_with_missing_values_test() {
"colour,name,score,youtube\nPink,Lucy,100,\n,Isaac,99,@IsaacHarrisHolt",
)
}

pub fn quotes_test() {
let stringy =
"\"Date\",\"Type\",\"Price\",\"Ammount\"\n\"11/11/2024\",\"Apples\",\"7\",\"5\""

gsv.to_lists(stringy)
|> should.be_ok
|> should.equal([
["Date", "Type", "Price", "Ammount"],
["11/11/2024", "Apples", "7", "5"],
])
}

0 comments on commit 530126b

Please sign in to comment.