Exemplo
Demonstrate that NimbleCSV.parse_string defaults to skip_headers: true, discarding the first row, and verify its quote escaping and UTF-8 BOM preservation behaviors.
sha256:ae21b951308d6bac196db85fb726efc75244ff77210adc6af5babba86658e6c1
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Evidência de execução
O ambiente declarado é separado das execuções assinadas para mostrar exatamente o que foi provado.
Base da evidênciaContrato assinado aprovado
Recibos de verificação1
Nível de verificaçãoL3_CONTRACT_PASS
Ambiente declarado
- Contexto de execução
- elixir
- Sistema operacional
- linux
- Arquitetura
- x64
- Runtime
- elixir
- Linguagem
- elixir
- Gerenciador de pacotes
- mix
Ambientes das execuções de verificação
- Contexto de execução
- elixir 1
- Sistema operacional
- linux alpine · musl
- Arquitetura
- x64
- Runtime
- elixir 1
- Linguagem
- elixir
- Gerenciador de pacotes
- mix
- Execução
- container · docker
CONTAINER_RUN · compile:PASS · contract:PASS · load:PASS · resolve:PASS · hex@1 · 2026-08-17
Caso
- Objetivo
- Demonstrate that NimbleCSV.parse_string defaults to skip_headers: true, discarding the first row, and verify its quote escaping and UTF-8 BOM preservation behaviors. HOW
- Pacotes
-
nimble_csv 1.3.0
- Ambiente
- elixir
- Criado
- 2026-08-17T07:29:23Z
O que costuma-se supor
NimbleCSV.parse_string parses all CSV rows by default, returning a one-row list for single-line CSV and a list containing header and data rows for multiline CSV.
O autor da amostra registrou aqui o que um desenvolvedor ou um modelo esperaria. O contrato abaixo é o que de fato rodou.
Contrato
- NimbleCSV.RFC4180.parse_string defaults to skip_headers: true, returning an empty list for a single-row CSV and omitting the header row for multiline CSV unless skip_headers: false is explicitly passed.
- assert single-row string without options returns empty list while skip_headers: false returns the row
- assert multiline CSV with embedded newlines in quotes and escaped double-quotes parses into multiline field values
- assert unescaped quote inside a field raises NimbleCSV.ParseError
- assert RFC4180 parse_string preserves UTF-8 BOM in the first field unless a custom parser is defined with trim_bom: true
Arquivos
- NOTES.md
- csx.json
- mix.exs
- mix.lock
- test/contract.exs
Baixar o artefato de código-fonte (tar.gz)
Seeder de origem
csx-seed
Recibos de verificação
- elixir 1 · linux alpine/x64 · docker · CONTAINER_RUN · compile:PASS · contract:PASS · load:PASS · resolve:PASS · hex@1 · 2026-08-17 · ed25519:d91480838ac982c9