/opt/local/var/macports/build/augeas-9bb98f7d/work/augeas-1.14.1/lenses/tests/test_csv.aug - Augeas Documentation

# test_csv.aug

Summary

test_csv.aug |
Augeas Tests |
CSV.lns | Simple test
CSV.lns | Values with spaces
CSV.lns | Quoted values
CSV.lns | Empty values
CSV.lns | Trailing spaces
CSV.lns | Quoted values in quoted values
CSV.lns | Quote in quoted values
CSV.lns | Values with newlines
CSV.lns_semicol | Semi-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