---
title: "Verify CSV export preserves delimiters and line breaks"
description: "Test a sandbox CSV export containing commas, quotes, and multiline fields, comparing parsed cells with the original records rather than raw line counts."
canonical_url: "https://vostride.com/agent-library/reporting-exports/csv-special-character-roundtrip.md"
md_url: "https://vostride.com/agent-library/reporting-exports/csv-special-character-roundtrip.md"
content_kind: "recipe"
topic: "reporting-exports"
---

# Verify CSV export preserves delimiters and line breaks

Test a sandbox CSV export containing commas, quotes, and multiline fields, comparing parsed cells with the original records rather than raw line counts.

## Risk

CSV rows cannot safely be counted by splitting on newlines when fields contain line breaks. Parse the artifact with an independent CSV reader and compare exact cell values so valid escaping and data corruption are distinguishable.

## Fixtures

- An owned sandbox report with three synthetic records containing a comma, embedded quotes, and a multiline description.
- A test report viewer and an independently prepared manifest of exact field values and expected column order.
- An approved artifact retrieval workflow plus a project-owned CSV parser oracle; no private customer data enters the fixture.

## Steps

1. Open the report and verify the three fixture identifiers and selected columns are visible before exporting.
2. Request CSV export and verify the completed job reports the intended report scope and format.
3. Retrieve the artifact through the prepared workflow and verify the independent parser reads one header and exactly three data records.
4. Compare every parsed cell with the manifest, including embedded quotes and line breaks, and verify the reopened export job references the same artifact.

## Expected results

- Parsed records preserve all punctuation and multiline content exactly.
- Column order and record identifiers match the selected report manifest.
- The artifact contains three logical records regardless of its physical line count.

## False-pass traps

- Counting newline characters can report extra records for a perfectly valid multiline field.
- A file that opens without error can still shift values into the wrong columns.

## Cleanup

- Delete the disposable report artifact and any run-specific synthetic records.

## Use with agent-qa

Adapt this test design to your application's acceptance criteria and configured target using the [recipe execution guide](/agent-library/software-factory/turn-a-recipe-into-an-agent-qa-test.md). External fixture setup and non-UI checks require your own supported hooks or test tooling. Validate the authored test, execute it, and inspect the completed evidence; this recipe is not a recorded test result.

## References

- [agent-qa first test](/docs/agent-qa/guides/first-test.md)
- [agent-qa hooks](/docs/agent-qa/guides/hooks.md)
- [agent-qa test](/docs/agent-qa/configuration/test.md)

- [Reporting and export QA recipes](/agent-library/reporting-exports.md)
- [Software factory QA library](/agent-library.md)
