Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Behaviour for FeedsCSVParser::getTemplate()
is not yet covered. As there are sometimes feature request and bug reports for it, it would be good to have some test covering for it.
Issues for the CSV template:
- #1996240: Duplicate fields in CSV template
- #1988970: FeedsCSV parser - download template should use the default delimiter
- #2557581: CSV column names escaped & upload field double escaping.
- #2428777: The CSV template file always comes with one or more empty first rows
- #2624430: Extra permission to allow users to download the template but no need to grant the general feed permission
- #2629620: Template for TSV contains the word "TAB" instead of tabs
- #2629620: Template for TSV contains the word "TAB" instead of tabs
- #2769993: Support non-UTF-8 column headers in CSV template
Proposed resolution
Implement a test for it, covering the following cases:
- Each delimiter: ,;TAB|+. When using the delimiter in a source key, that source key should be wrapped with double quotes.
- Multiple mappings of the same source key: each source key should be printed once in the CSV template.
- Special characters in source keys:
&
should not be converted to&
for example.
Patch will follow.
Comment | File | Size | Author |
---|---|---|---|
#2 | feeds-csv-template-tests-2771803-2.patch | 5.56 KB | MegaChriz |
|
Comments
Comment #2
MegaChriz CreditAttribution: MegaChriz as a volunteer commentedComment #4
MegaChriz CreditAttribution: MegaChriz as a volunteer commentedGreat, tests passed!
Committed #2.