combine functions behind to/from-c/tsv commands#990
combine functions behind to/from-c/tsv commands#990andrasio merged 1 commit intonushell:masterfrom drmason13:combine-csv-and-tsv
Conversation
tests/filters_test.rs
Outdated
| fn can_convert_table_to_tsv_text_and_from_tsv_text_back_into_table_using_csv_separator() { | ||
| let actual = nu!( | ||
| cwd: "tests/fixtures/formats", | ||
| r"open caco3_plastics.csv | to-tsv | from-csv --separator '\t' | first 1 | get origin | echo $it" |
There was a problem hiding this comment.
Shouldn't this be caco3_plastics.tsv ?
There was a problem hiding this comment.
ah yes! it should, good spot
There was a problem hiding this comment.
let me just force push over this, if that's ok with you?
There was a problem hiding this comment.
Although I think this test is correct. You are opening a csv file and getting a table, converting to tsv and using the expected from-csv with the separator wanted in this case.
This is correct.
There was a problem hiding this comment.
it's slightly confusing... but yes, it wouldn't matter what format the file was as long as it reads as a table, then we make tsv text (so we add tabs) and then we parse that as csv separated by tabs...
I think this does the job of demonstrating that tsv and csv --separator '\t' are interoperable :D
fixes #969, admittedly without a --delimiter alias moves from_structured_data.rs to from_delimited_data.rs to better identify its scope and adds to_delimited_data.rs. Now csv and tsv both use the same code, tsv passes in a fixed '\t' argument where csv passes in the value of --separator
* Updated the oh-my-posh setup guide * fixed typo
fixes #969, admittedly without a --delimiter alias
moves from_structured_data.rs to from_delimited_data.rs to better
identify its scope and adds to_delimited_data.rs. Now csv and tsv both
use the same code, tsv passes in a fixed '\t' argument where csv passes
in the value of --separator