test_csv.aug

Summary
test_csv.aug
Augeas Tests
CSV.lnsSimple test
CSV.lnsValues with spaces
CSV.lnsQuoted values
CSV.lnsEmpty values
CSV.lnsTrailing spaces
CSV.lnsQuoted values in quoted values
CSV.lnsQuote in quoted values
CSV.lnsValues with newlines
CSV.lns_semicolSemi-colon lens

Augeas Tests

CSV.lns

test CSV.lns get "a,b,c\n" = { "1" { "1" = "a" } { "2" = "b" } { "3" = "c" } }

Simple test

CSV.lns

test CSV.lns get "a,b c,d\n" = { "1" { "1" = "a" } { "2" = "b c" } { "3" = "d" } }

Values with spaces

CSV.lns

test CSV.lns get "a,\"b,c\",d # comment # e,f,with space\n" = { "1" { "1" = "a" } { "2" = "\"b,c\"" } { "3" = "d" } } { "#comment" = "comment" } { } { "2" { "1" = "e" } { "2" = "f" } { "3" = "with space" } }

Quoted values

CSV.lns

test CSV.lns get ", ,,\n" = { "1" { "1" = "" } { "2" = "" } } { "2" { "1" = "" } { "2" = "" } { "3" = "" } }

Empty values

CSV.lns

test CSV.lns get "a , b \n" = { "1" { "1" = "a " } { "2" = " b " } } { "2" { "1" = " " } }

Trailing spaces

CSV.lns

test CSV.lns get "\"a,b\"\"c d\"\"\"\n" = { "1" { "1" = "\"a,b\"\"c d\"\"\"" } }

Quoted values in quoted values

CSV.lns

test CSV.lns get "\"a,b\"\"c d\"\n" = { "1" { "1" = "\"a,b\"\"c d\"" } }

Quote in quoted values

CSV.lns

test CSV.lns get "a,\"b\n c\"\n" = { "1" { "1" = "a" } { "2" = "\"b\n c\"" } }

Values with newlines

CSV.lns_semicol

test CSV.lns_semicol get "a;\"b;c\";d # comment # e;f;with space\n" = { "1" { "1" = "a" } { "2" = "\"b;c\"" } { "3" = "d" } } { "#comment" = "comment" } { } { "2" { "1" = "e" } { "2" = "f" } { "3" = "with space" } }

Semi-colon lens

test CSV.lns get "a,b,c\n" = { "1" { "1" = "a" } { "2" = "b" } { "3" = "c" } }
Simple test
test CSV.lns_semicol get "a;\"b;c\";d # comment # e;f;with space\n" = { "1" { "1" = "a" } { "2" = "\"b;c\"" } { "3" = "d" } } { "#comment" = "comment" } { } { "2" { "1" = "e" } { "2" = "f" } { "3" = "with space" } }
Semi-colon lens
Close