pax_global_header 0000666 0000000 0000000 00000000064 15130702260 0014506 g ustar 00root root 0000000 0000000 52 comment=a678e6fdeffa89bd28e4ecc148b926a4e1bbbc7b
hukkin-tomli-7940ff4/ 0000775 0000000 0000000 00000000000 15130702260 0014466 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/.bumpversion.cfg 0000664 0000000 0000000 00000000707 15130702260 0017602 0 ustar 00root root 0000000 0000000 [bumpversion]
commit = True
tag = True
tag_name = {new_version}
current_version = 2.4.0
[bumpversion:file:pyproject.toml]
search = version = "{current_version}" # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT
replace = version = "{new_version}" # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT
[bumpversion:file:src/tomli/__init__.py]
search = __version__ = "{current_version}"
replace = __version__ = "{new_version}"
hukkin-tomli-7940ff4/.flake8 0000664 0000000 0000000 00000000352 15130702260 0015641 0 ustar 00root root 0000000 0000000 [flake8]
max-line-length = 88
extend-ignore =
# E203: Whitespace before ':' (violates PEP8 and black style)
E203,
# B042: Requires calling super().__init__ in custom exceptions
B042,
extend-exclude = */site-packages/*
hukkin-tomli-7940ff4/.github/ 0000775 0000000 0000000 00000000000 15130702260 0016026 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/.github/workflows/ 0000775 0000000 0000000 00000000000 15130702260 0020063 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/.github/workflows/tests.yaml 0000664 0000000 0000000 00000010411 15130702260 0022106 0 ustar 00root root 0000000 0000000 name: Tests
on:
push:
branches: [ master ]
tags: [ '[0-9]+.[0-9]+.[0-9]+*' ]
pull_request:
branches: [ master ]
env:
CIBW_TEST_COMMAND: python -m unittest discover --start-directory {project}
CIBW_SKIP: cp38-* cp39-* cp310-*
CIBW_ENVIRONMENT_PASS_LINUX: TOMLI_USE_MYPYC
FORCE_COLOR: 1
PIP_DISABLE_PIP_VERSION_CHECK: 1
jobs:
linters:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: '3.11'
- name: Install pre-commit
run: |
pip install pre-commit
- name: run linters
# pre-commit also runs in pre-commit.ci, but let's have it here too
# to block `pypi-publish` job from triggering if pre-commit fails
run: |
pre-commit run --all-files
tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['pypy3.11', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14', '3.15-dev']
os: [ubuntu-latest, macos-latest, windows-latest]
continue-on-error: ${{ matrix.python-version == '3.15-dev' }}
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install package
run: |
pip install .
- name: Test with unittest
run: |
python -m unittest
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: '3.x'
- name: Install package and coverage deps
run: |
pip install . coverage
- name: Measure coverage
run: |
# Coverage should be 100% without external tests
rm -rf tests/data/valid/_external/
rm -rf tests/data/invalid/_external/
coverage run -m unittest
coverage report --fail-under=100
- name: Report coverage
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
binary-wheels:
name: Binary wheels for ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-11-arm') && 'Windows (arm64)' || startsWith(matrix.os, 'windows-') && 'Windows' || endsWith(matrix.os, '-arm') && 'Linux (arm64)' || 'Linux' }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, windows-11-arm, macos-latest]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: '3.x'
- name: Switch build backend to setuptools
run: |
pip install -r scripts/requirements.txt
python scripts/use_setuptools.py
- name: Build wheels
uses: pypa/cibuildwheel@v3.3.1
env:
CIBW_ARCHS_MACOS: x86_64 arm64
TOMLI_USE_MYPYC: '1'
- uses: actions/upload-artifact@v6
with:
name: artifact-binary-${{ matrix.os }}
path: wheelhouse/*.whl
if-no-files-found: error
pure-python-wheel-and-sdist:
name: Build a pure Python wheel and source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install build dependencies
run: pip install build
- name: Build
run: python -m build
- uses: actions/upload-artifact@v6
with:
name: artifact-pure-python
path: dist/*
if-no-files-found: error
allgood:
runs-on: ubuntu-latest
needs:
- tests
- coverage
- linters
- binary-wheels
- pure-python-wheel-and-sdist
steps:
- run: echo "Great success!"
pypi-publish:
# Only publish if all other jobs succeed
needs: [ allgood ]
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v7
with:
path: dist
pattern: artifact-*
merge-multiple: true
- uses: actions/setup-python@v6
with:
python-version: '3.x'
- name: Install twine
run: |
pip install twine
- name: Check and publish
run: |
twine check --strict dist/*
twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
hukkin-tomli-7940ff4/.gitignore 0000664 0000000 0000000 00000003456 15130702260 0016466 0 ustar 00root root 0000000 0000000 # Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
.python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# IntelliJ
.idea/
# VS Code
.vscode/
hukkin-tomli-7940ff4/.pre-commit-config.yaml 0000664 0000000 0000000 00000003740 15130702260 0020753 0 ustar 00root root 0000000 0000000 repos:
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: a30f0d816e5062a67d87c8de753cfe499672b959 # frozen: v1.5.5
hooks:
- id: insert-license
files: '^src/.+\.py$|^tests/.+\.py$'
args: ['--license-filepath', 'LICENSE-HEADER']
- repo: https://github.com/executablebooks/mdformat
rev: 2d496dbc18e31b83a1596685347ffe0b6041daf0 # frozen: 1.0.0
hooks:
- id: mdformat
additional_dependencies:
- mdformat-toc
- mdformat-gfm
- mdformat-black
- repo: https://github.com/asottile/yesqa
rev: f2ae90cf9e1661ade79d0881186ce4fd7ba6ee79 # frozen: v1.5.0
hooks:
- id: yesqa
additional_dependencies:
- flake8-bugbear
- flake8-builtins
- flake8-comprehensions
- repo: https://github.com/MarcoGorelli/absolufy-imports
rev: 1683a63d850e065495c05b771e4a20db010a58e7 # frozen: v0.3.1
hooks:
- id: absolufy-imports
files: '^src/.+\.py$'
args: ['--never', '--application-directories', 'src']
- repo: https://github.com/PyCQA/isort
rev: 0a09c783808cfe77bb3269250f663ff733d23302 # frozen: 7.0.0
hooks:
- id: isort
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 831207fd435b47aeffdf6af853097e64322b4d44 # frozen: 25.12.0
hooks:
- id: black
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
hooks:
- id: check-yaml
- repo: https://github.com/pre-commit/pygrep-hooks
rev: 3a6eb0fadf60b3cccfd80bad9dbb6fae7e47b316 # frozen: v1.10.0
hooks:
- id: python-use-type-annotations
- id: python-check-blanket-noqa
- id: python-check-blanket-type-ignore
- repo: https://github.com/PyCQA/flake8
rev: d93590f5be797aabb60e3b09f2f52dddb02f349f # frozen: 7.3.0
hooks:
- id: flake8
additional_dependencies:
- flake8-bugbear
- flake8-builtins
- flake8-comprehensions
- repo: https://github.com/pre-commit/mirrors-mypy
rev: a66e98df7b4aeeb3724184b332785976d062b92e # frozen: v1.19.1
hooks:
- id: mypy
args: ["--scripts-are-modules"]
hukkin-tomli-7940ff4/CHANGELOG.md 0000664 0000000 0000000 00000012534 15130702260 0016304 0 ustar 00root root 0000000 0000000 # Changelog
## 2.4.0
- Added
- TOML v1.1.0 compatibility
- Binary wheels for Windows arm64
## 2.3.0
- Added
- Binary wheels for Python 3.14 (also free-threaded)
- Performance
- Reduced import time
## 2.2.1
- Fixed
- Don't attempt to compile binary wheels for Python 3.8, 3.9 and 3.10 where cibuildwheel depends on a conflicting Tomli version
## 2.2.0
- Added
- mypyc generated binary wheels for common platforms
## 2.1.0
- Deprecated
- Instantiating `TOMLDecodeError` with free-form arguments.
`msg`, `doc` and `pos` arguments should be given.
- Added
- `msg`, `doc`, `pos`, `lineno` and `colno` attributes to `TOMLDecodeError`
## 2.0.2
- Removed
- Python 3.7 support
- Improved
- Make `loads` raise `TypeError` not `AttributeError` on bad input types that do not have the `replace` attribute.
Improve error message when `bytes` is received.
- Type annotations
- Type annotate `load` input as `typing.IO[bytes]` (previously `typing.BinaryIO`).
## 2.0.1
- Improved
- Make bundling easier by using relative imports internally and adding license and copyright notice to source files.
- Make error messages more uniform
- Raise a friendly `TypeError` for wrong file mode
- Allow `parse_float` to return objects having the `append` attr
- Eagerly raise an error if `parse_float` returns an illegal type
- Packaging
- Move from `pytest` testing framework to `unittest` and remove `python-dateutil` test dependency.
Tests now only require Python interpreter.
## 1.2.3
- Fixed
- Backport: Allow lower case "t" and "z" in datetimes
## 2.0.0
- Removed
- Python 3.6 support
- Support for text file objects as `load` input. Use binary file objects instead.
- First argument of `load` and `loads` can no longer be passed by keyword.
- Fixed
- Allow lower case "t" and "z" in datetimes
- Improved
- Raise an error when dotted keys define values outside the "current table".
Technically speaking TOML v1.0.0 does allow such assignments
but that isn't intended by specification writers,
and will change in a future specification version (see the [pull request](https://github.com/toml-lang/toml/pull/848)).
## 1.2.2
- Fixed
- Illegal characters in error messages were surrounded by two pairs of quotation marks
- Improved
- `TOMLDecodeError.__module__` is now the public import path (`tomli`) instead of private import path (`tomli._parser`)
- Eliminated an import cycle when `typing.TYPE_CHECKING` is `True`.
This allows `sphinx-autodoc-typehints` to resolve type annotations.
## 1.2.1
- Fixed
- Raise an error if a carriage return (without a following line feed) is found in a multi-line basic string
- Type annotations
- Type annotate `load` input as `typing.BinaryIO` only to discourage use of deprecated text file objects.
- Packaging
- Remove legacy `setup.py` from PyPI source distribution.
If you're a packager and absolutely need this file, please create an issue.
## 1.2.0
- Deprecated
- Text file objects as input to `load`.
Binary file objects should be used instead to avoid opening a TOML file with universal newlines or with an encoding other than UTF-8.
## 1.1.0
- Added
- `load` can now take a binary file object
## 1.0.4
- Performance
- Minor boost (~4%)
## 1.0.3
- Fixed
- Raise `TOMLDecodeError` instead of `ValueError` when parsing dates and datetimes that pass the regex check but don't correspond to a valid date or datetime.
- Performance
- Improved multiline literal string parsing performance
## 1.0.2
- Performance
- Minor boost (~4%)
## 1.0.1
- Performance
- A significant boost
## 1.0.0
- Fixed
- Raise `TOMLDecodeError` instead of `KeyError` when overwriting implicitly in an inline table
## 0.2.10
- Fixed
- Raise `TOMLDecodeError` if overwriting nested inline tables from the parent inline
- Raise `TOMLDecodeError` if escaped Unicode character is not a Unicode scalar value
- Performance
- Increased parsing speed of single line basic strings, and multi-line literal and basic strings
## 0.2.9
- Fixed
- `TOMLDecodeError` now raised when opening a table implicitly created by a key/value pair
- Don't error when two array-of-tables items open a subtable with the same name
- Don't error when opening parent table of an already defined array-of-tables item
## 0.2.8
- Performance
- Significant boost to comment parsing speed
## 0.2.7
- Added
- Improved `TOMLDecodeError` error messages.
Line and column are included when applicable.
## 0.2.6
- Performance
- Over 5% boost
## 0.2.5
- Fixed
- Made exception type `TOMLDecodeError` when overwriting a value with a deeply nested table
## 0.2.4
- Fixed
- `TOMLDecodeError` is now raised when attempting to overwrite a value in an inline table's or array's namespace with a table definition
## 0.2.3
- Fixed
- Error type was not TOMLDecodeError in some obscure cases
## 0.2.2
- Added
- `tomli.load` for parsing IO streams returned by `open()`
- `parse_float` keyword argument to `tomli.loads`.
Allows parsing TOML floats to a non-float type in Python.
## 0.2.1
- Fixed
- `TOMLDecodeError` is now raised for duplicate keys in inline tables,
as opposed to silently overriding the previous value
## 0.2.0
- Changed
- Project name to Tomli
- Performance
- A performance boost
## 0.1.0
- Added
- `tomli.loads` for parsing TOML strings
- `tomli.TOMLDecodeError` that is raised for parse errors
hukkin-tomli-7940ff4/LICENSE 0000664 0000000 0000000 00000002060 15130702260 0015471 0 ustar 00root root 0000000 0000000 MIT License
Copyright (c) 2021 Taneli Hukkinen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
hukkin-tomli-7940ff4/LICENSE-HEADER 0000664 0000000 0000000 00000000171 15130702260 0016420 0 ustar 00root root 0000000 0000000 SPDX-License-Identifier: MIT
SPDX-FileCopyrightText: 2021 Taneli Hukkinen
Licensed to PSF under a Contributor Agreement.
hukkin-tomli-7940ff4/MANIFEST.in 0000664 0000000 0000000 00000000015 15130702260 0016220 0 ustar 00root root 0000000 0000000 prune tests/
hukkin-tomli-7940ff4/README.md 0000664 0000000 0000000 00000023000 15130702260 0015740 0 ustar 00root root 0000000 0000000 [](https://github.com/hukkin/tomli/actions?query=workflow%3ATests+branch%3Amaster+event%3Apush)
[](https://codecov.io/gh/hukkin/tomli)
[](https://pypi.org/project/tomli)
# Tomli
> A lil' TOML parser
**Table of Contents** *generated with [mdformat-toc](https://github.com/hukkin/mdformat-toc)*
- [Intro](#intro)
- [Installation](#installation)
- [Usage](#usage)
- [Parse a TOML string](#parse-a-toml-string)
- [Parse a TOML file](#parse-a-toml-file)
- [Handle invalid TOML](#handle-invalid-toml)
- [Construct `decimal.Decimal`s from TOML floats](#construct-decimaldecimals-from-toml-floats)
- [Building a `tomli`/`tomllib` compatibility layer](#building-a-tomlitomllib-compatibility-layer)
- [FAQ](#faq)
- [Why this parser?](#why-this-parser)
- [Is comment preserving round-trip parsing supported?](#is-comment-preserving-round-trip-parsing-supported)
- [Is there a `dumps`, `write` or `encode` function?](#is-there-a-dumps-write-or-encode-function)
- [How do TOML types map into Python types?](#how-do-toml-types-map-into-python-types)
- [Performance](#performance)
- [Pure Python](#pure-python)
- [Mypyc generated wheel](#mypyc-generated-wheel)
## Intro
Tomli is a Python library for parsing [TOML](https://toml.io).
Version 2.4.0 and later are compatible with [TOML v1.1.0](https://toml.io/en/v1.1.0).
Older versions are [TOML v1.0.0](https://toml.io/en/v1.0.0) compatible.
A version of Tomli, the `tomllib` module,
was added to the standard library in Python 3.11
via [PEP 680](https://www.python.org/dev/peps/pep-0680/).
Tomli continues to provide a backport on PyPI for Python versions
where the standard library module is not available
and that have not yet reached their end-of-life.
Tomli uses [mypyc](https://github.com/mypyc/mypyc)
to generate binary wheels for most of the widely used platforms,
so Python 3.11+ users may prefer it over `tomllib` for improved performance.
Pure Python wheels are available on any platform and should perform the same as `tomllib`.
## Installation
```bash
pip install tomli
```
## Usage
### Parse a TOML string
```python
import tomli
toml_str = """
[[players]]
name = "Lehtinen"
number = 26
[[players]]
name = "Numminen"
number = 27
"""
toml_dict = tomli.loads(toml_str)
assert toml_dict == {
"players": [{"name": "Lehtinen", "number": 26}, {"name": "Numminen", "number": 27}]
}
```
### Parse a TOML file
```python
import tomli
with open("path_to_file/conf.toml", "rb") as f:
toml_dict = tomli.load(f)
```
The file must be opened in binary mode (with the `"rb"` flag).
Binary mode will enforce decoding the file as UTF-8 with universal newlines disabled,
both of which are required to correctly parse TOML.
### Handle invalid TOML
```python
import tomli
try:
toml_dict = tomli.loads("]] this is invalid TOML [[")
except tomli.TOMLDecodeError:
print("Yep, definitely not valid.")
```
Note that error messages are considered informational only.
They should not be assumed to stay constant across Tomli versions.
### Construct `decimal.Decimal`s from TOML floats
```python
from decimal import Decimal
import tomli
toml_dict = tomli.loads("precision-matters = 0.982492", parse_float=Decimal)
assert isinstance(toml_dict["precision-matters"], Decimal)
assert toml_dict["precision-matters"] == Decimal("0.982492")
```
Note that `decimal.Decimal` can be replaced with another callable that converts a TOML float from string to a Python type.
The `decimal.Decimal` is, however, a practical choice for use cases where float inaccuracies can not be tolerated.
Illegal types are `dict` and `list`, and their subtypes.
A `ValueError` will be raised if `parse_float` produces illegal types.
### Building a `tomli`/`tomllib` compatibility layer
Python versions 3.11+ ship with a version of Tomli:
the `tomllib` standard library module.
To build code that uses the standard library if available,
but still works seamlessly with Python 3.6+,
do the following.
Instead of a hard Tomli dependency, use the following
[dependency specifier](https://packaging.python.org/en/latest/specifications/dependency-specifiers/)
to only require Tomli when the standard library module is not available:
```
tomli >= 1.1.0 ; python_version < "3.11"
```
Then, in your code, import a TOML parser using the following fallback mechanism:
```python
import sys
if sys.version_info >= (3, 11):
import tomllib
else:
import tomli as tomllib
tomllib.loads("['This parses fine with Python 3.6+']")
```
## FAQ
### Why this parser?
- it's lil'
- pure Python with zero dependencies
- the fastest pure Python parser [\*](#pure-python):
18x as fast as [tomlkit](https://pypi.org/project/tomlkit/),
2.1x as fast as [toml](https://pypi.org/project/toml/)
- outputs [basic data types](#how-do-toml-types-map-into-python-types) only
- 100% spec compliant: passes all tests in
[toml-lang/toml-test](https://github.com/toml-lang/toml-test)
test suite
- thoroughly tested: 100% branch coverage
### Is comment preserving round-trip parsing supported?
No.
The `tomli.loads` function returns a plain `dict` that is populated with builtin types and types from the standard library only.
Preserving comments requires a custom type to be returned so will not be supported,
at least not by the `tomli.loads` and `tomli.load` functions.
Look into [TOML Kit](https://github.com/sdispater/tomlkit) if preservation of style is what you need.
### Is there a `dumps`, `write` or `encode` function?
[Tomli-W](https://github.com/hukkin/tomli-w) is the write-only counterpart of Tomli, providing `dump` and `dumps` functions.
The core library does not include write capability, as most TOML use cases are read-only, and Tomli intends to be minimal.
### How do TOML types map into Python types?
| TOML type | Python type | Details |
| ---------------- | ------------------- | ------------------------------------------------------------ |
| Document Root | `dict` | |
| Key | `str` | |
| String | `str` | |
| Integer | `int` | |
| Float | `float` | |
| Boolean | `bool` | |
| Offset Date-Time | `datetime.datetime` | `tzinfo` attribute set to an instance of `datetime.timezone` |
| Local Date-Time | `datetime.datetime` | `tzinfo` attribute set to `None` |
| Local Date | `datetime.date` | |
| Local Time | `datetime.time` | |
| Array | `list` | |
| Table | `dict` | |
| Inline Table | `dict` | |
## Performance
The `benchmark/` folder in this repository contains a performance benchmark for comparing the various Python TOML parsers.
Below are the results for commit [0724e2a](https://github.com/hukkin/tomli/tree/0724e2ab1858da7f5e05a9bffdb24c33589d951c).
### Pure Python
```console
foo@bar:~/dev/tomli$ python --version
Python 3.12.7
foo@bar:~/dev/tomli$ pip freeze
attrs==21.4.0
click==8.1.7
pytomlpp==1.0.13
qtoml==0.3.1
rtoml==0.11.0
toml==0.10.2
tomli @ file:///home/foo/dev/tomli
tomlkit==0.13.2
foo@bar:~/dev/tomli$ python benchmark/run.py
Parsing data.toml 5000 times:
------------------------------------------------------
parser | exec time | performance (more is better)
-----------+------------+-----------------------------
rtoml | 0.647 s | baseline (100%)
pytomlpp | 0.891 s | 72.62%
tomli | 3.14 s | 20.56%
toml | 6.69 s | 9.67%
qtoml | 8.27 s | 7.82%
tomlkit | 56.1 s | 1.15%
```
### Mypyc generated wheel
```console
foo@bar:~/dev/tomli$ python benchmark/run.py
Parsing data.toml 5000 times:
------------------------------------------------------
parser | exec time | performance (more is better)
-----------+------------+-----------------------------
rtoml | 0.668 s | baseline (100%)
pytomlpp | 0.893 s | 74.81%
tomli | 1.96 s | 34.18%
toml | 6.64 s | 10.07%
qtoml | 8.26 s | 8.09%
tomlkit | 52.9 s | 1.26%
```
hukkin-tomli-7940ff4/benchmark/ 0000775 0000000 0000000 00000000000 15130702260 0016420 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/benchmark/LICENSE 0000664 0000000 0000000 00000002150 15130702260 0017423 0 ustar 00root root 0000000 0000000 MIT License
Copyright (c) 2020 Bob Fang (bob.fang.london@gmail.com)
Copyright (c) 2021 Taneli Hukkinen
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
hukkin-tomli-7940ff4/benchmark/README.md 0000664 0000000 0000000 00000000626 15130702260 0017703 0 ustar 00root root 0000000 0000000 # Benchmark
## Acknowledgments
This benchmark was shamelessly copied from
[pytomlpp](https://github.com/bobfang1992/pytomlpp/tree/e6b03726f8347c6a6757f520ad1b5fab68ed8534/benchmark)
repository and edited.
Credit goes to the authors of that project.
## Running
### Against the local Tomli state
```bash
tox -e benchmark
```
### Against the latest Tomli PyPI release
```bash
tox -e benchmark-pypi
```
hukkin-tomli-7940ff4/benchmark/data.toml 0000664 0000000 0000000 00000007665 15130702260 0020244 0 ustar 00root root 0000000 0000000 addition-used = false
afraid-boiling-draconian = 1916-12-15T11:26:42+11:26
boiling-whip = 12:23:17.000129
charming = 16771
close-unbecoming = 14:49:02
contain-terrible-neck = 1928-11-07T06:30:56
creature = 0.4857
crowded-profuse-capable = 1932-05-28
deserted-cross-creature = 1931-12-26T04:31:04
deserted-heavy = [ 2014-02-08, 1984-03-16, 1910-08-05 ]
fabulous = 0.3388
ghost-birds-legal = 1989-09-02
grandfather-weary = 10216
haircut-dreary-broken = 'unadvised rejoice lewd crime grandfather rice imperfect'
harm-snow = 0.6724
leather-aromatic-rabbit = false
license-harm = 1987-08-15T15:30:51+03:24
naughty-self-close = 1916-09-21T01:53:27-02:59
neck = 29653
neck-crime-wistful = 1998-12-07
rest-afraid = [
1912-06-23T07:00:07-07:46, # this is a datetime
1910-11-17T13:10:34, # pretty sure this is also a datetime
2014-08-03T04:37:12-06:36, # and this
1966-11-22T18:08:23+06:10, # and this
1985-03-01T08:11:38, # what about this?
1976-09-04T20:46:46+00:29, # yes that also
1964-05-18T20:13:27-01:25, # ...
1961-10-14T11:03:51.011555+06:23,
2005-07-13T02:57:15-01:46, # wonder how many comments there are typically in
2007-02-01T17:09:54-08:45, # a TOML file of this size
1952-03-06T09:15:04+01:44,
1962-12-25T23:00:11+04:28
]
rotten-best = 0.0325
run-curious = true
run-meaty = 04:40:20.003312
scintillating-cream = 0.2604
sisters-playground = 'week spiritual pause insidious uptight'
spiritual-borrow-messy = 16:49:32
surprise-jail-babies = 2008-01-01
title-unbiased = 1958-10-08
unbecoming-scene-lewd = true
worried-spicy = 23:03:54
[contain]
ghost = 0.2471
tank-lackadaisical = 1945-02-18T22:22:27+01:41
[contain.righteous-imperfect-remarkable]
ticket = 0.2412
voyage = 'prefer silky night draconian three dreary decisive'
wilderness-draconian = 04:58:17
[contain.righteous-imperfect-remarkable.deeply-night-gold]
legal = 1981-07-04
righteous = [ false, true, false, false, true ]
wilderness = 1900-12-24
[crime]
boiling-excuse-incandescent = 31173
flat-rejoice = 0.8682
furtive = 6866
heavy-memory = 5545
lackadaisical-terrible-overjoyed = [ 'harm acceptable naughty pause', 'page anxious threatening lewd' ]
reject-aromatic = [ false, true, true, true, false, true ]
reject-naughty = 11229
scintillating-bake-harm = 0.8258
[license-bat]
adorable-blind-string = 1961-08-14
bat = 1939-10-28
blind-wilderness = 2004-07-14
[rapid]
borrow = true
jail-weary-furtive = 'room'
protective-sulky = 4737
room-decisive-unbiased = 1998-11-01T12:23:58
soap = 1985-05-06
sprout-rich = 0.6026
[rapid.clean-leather]
blood-snow-mark = true
equable = 0.2923
fabulous = 1979-07-24T00:53:39+06:22
glorious-threatening = true
lewd-dull = 02:40:53.027288
[run-overjoyed]
creature-cheerful = 11071
respect-history-anxious = 0.4637
vessel = 'curious'
[inline-tables]
table1 ={ the-text-in-this = 'file is weeiiird' , autogenerated-perhaps= 1199999 , subtableee = {blii=false}}
table2 = { arr = [ { id = 0 }, { id = 1}, { id = 2} ] }
[[dynamic-arrays.products]]
name = "juusto"
[[dynamic-arrays.products]]
name = "tee \t\t kannu"
[[dynamic-arrays.products]]
name = "\n\nkahvi"
[[dynamic-arrays.products]]
name = "\"riisi\""
[[dynamic-arrays.products]]
name = "puuro \\ riisipuuro"
# Fusce sit amet risus vel sapien vestibulum interdum. Aliquam finibus
# finibus nibh, sed mattis nulla lacinia in. Nunc ac volutpat massa,
# at fringilla dui. In dignissim pellentesque luctus. Cras ac ex metus.
# Duis ut molestie augue. Donec vitae nulla massa. Sed blandit diam sit
# amet mauris posuere consectetur.
[multiline-strings]
literal-str = '''
Liirum laarum liirum laarum.
Liirum laarum liirum laarum.
Liirum laarum liirum laarum.
'''
basic-str = """\
Escape whitespace. \
Liirum laarum liirum laarum.\ueeee\U000eeeee\u1234
"""
hukkin-tomli-7940ff4/benchmark/requirements.txt 0000664 0000000 0000000 00000000277 15130702260 0021712 0 ustar 00root root 0000000 0000000 # NOTE
# Tomli itself is not included here because tox is used to read
# this file and install the deps, and it handles the Tomli
# installation separately.
pytomlpp
toml
tomlkit
qtoml
rtoml
hukkin-tomli-7940ff4/benchmark/run.py 0000664 0000000 0000000 00000004444 15130702260 0017604 0 ustar 00root root 0000000 0000000 from __future__ import annotations
from collections.abc import Callable
from pathlib import Path
import timeit
import pytomlpp
import qtoml
import rtoml
import toml
import tomlkit
import tomli
def benchmark(
name: str,
run_count: int,
func: Callable,
col_width: tuple,
compare_to: float | None = None,
) -> float:
placeholder = "Running..."
print(f"{name:>{col_width[0]}} | {placeholder}", end="", flush=True)
time_taken = timeit.timeit(func, number=run_count)
print("\b" * len(placeholder), end="")
time_suffix = " s"
print(f"{time_taken:{col_width[1]-len(time_suffix)}.3g}{time_suffix}", end="")
if compare_to is None:
print(" | baseline (100%)", end="")
else:
delta = compare_to / time_taken
print(f" | {delta:.2%}", end="")
print()
return time_taken
def run(run_count: int) -> None:
data_path = Path(__file__).parent / "data.toml"
test_data = data_path.read_bytes().decode()
# qtoml has a bug making it crash without this newline normalization
test_data = test_data.replace("\r\n", "\n")
col_width = (10, 10, 28)
col_head = ("parser", "exec time", "performance (more is better)")
print(f"Parsing data.toml {run_count} times:")
print("-" * col_width[0] + "---" + "-" * col_width[1] + "---" + col_width[2] * "-")
print(
f"{col_head[0]:>{col_width[0]}} | {col_head[1]:>{col_width[1]}} | {col_head[2]}"
)
print("-" * col_width[0] + "-+-" + "-" * col_width[1] + "-+-" + col_width[2] * "-")
# fmt: off
baseline = benchmark("rtoml", run_count, lambda: rtoml.loads(test_data), col_width) # noqa: E501
benchmark("pytomlpp", run_count, lambda: pytomlpp.loads(test_data), col_width, compare_to=baseline) # noqa: E501
benchmark("tomli", run_count, lambda: tomli.loads(test_data), col_width, compare_to=baseline) # noqa: E501
benchmark("toml", run_count, lambda: toml.loads(test_data), col_width, compare_to=baseline) # noqa: E501
benchmark("qtoml", run_count, lambda: qtoml.loads(test_data), col_width, compare_to=baseline) # noqa: E501
benchmark("tomlkit", run_count, lambda: tomlkit.parse(test_data), col_width, compare_to=baseline) # noqa: E501
# fmt: on
if __name__ == "__main__":
run(5000)
hukkin-tomli-7940ff4/fuzzer/ 0000775 0000000 0000000 00000000000 15130702260 0016013 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/fuzzer/fuzz.py 0000664 0000000 0000000 00000004124 15130702260 0017364 0 ustar 00root root 0000000 0000000 import atheris
with atheris.instrument_imports():
from math import isnan
import sys
import warnings
import tomli_w
import tomli
# Disable any caching used so that the same lines of code run
# on a given input consistently.
tomli._re.cached_tz = tomli._re.cached_tz.__wrapped__
# Suppress all warnings.
warnings.simplefilter("ignore")
def test_one_input(input_bytes: bytes) -> None:
# We need a Unicode string, not bytes
fdp = atheris.FuzzedDataProvider(input_bytes)
data = fdp.ConsumeUnicode(sys.maxsize)
try:
toml_obj = tomli.loads(data)
except (tomli.TOMLDecodeError, RecursionError):
return
except BaseException:
print_err(data)
raise
try:
recovered_data = tomli_w.dumps(toml_obj)
except RecursionError:
return
except BaseException:
print_err(data)
raise
roundtripped_obj = tomli.loads(recovered_data)
normalize_toml_obj(roundtripped_obj)
normalize_toml_obj(toml_obj)
if roundtripped_obj != toml_obj:
sys.stderr.write(
f"Original dict:\n{toml_obj}\nRoundtripped dict:\n{roundtripped_obj}\n"
)
sys.stderr.flush()
print_err(data)
raise Exception("Dicts not equal after roundtrip")
def print_err(data):
codepoints = [hex(ord(x)) for x in data]
sys.stderr.write(f"Input was {type(data)}:\n{data}\nCodepoints:\n{codepoints}\n")
sys.stderr.flush()
def normalize_toml_obj(toml_obj: dict) -> None:
"""Make NaNs equal when compared (without using recursion)."""
to_process = [toml_obj]
while to_process:
cont = to_process.pop()
for k, v in cont.items() if isinstance(cont, dict) else enumerate(cont):
if isinstance(v, float) and isnan(v):
cont[k] = "nan"
elif isinstance(v, (dict, list)):
to_process.append(v)
def main():
# For possible options, see https://llvm.org/docs/LibFuzzer.html#options
fuzzer_options = sys.argv
atheris.Setup(fuzzer_options, test_one_input)
atheris.Fuzz()
if __name__ == "__main__":
main()
hukkin-tomli-7940ff4/fuzzer/requirements.txt 0000664 0000000 0000000 00000000101 15130702260 0021267 0 ustar 00root root 0000000 0000000 # sudo apt-get install clang
wheel
atheris==2.0.7
tomli_w>=0.2.2
hukkin-tomli-7940ff4/profiler/ 0000775 0000000 0000000 00000000000 15130702260 0016310 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/profiler/profiler_script.py 0000664 0000000 0000000 00000000613 15130702260 0022070 0 ustar 00root root 0000000 0000000 """A script for profiling.
To generate and read results:
- `tox -e profile`
- `firefox .tox/prof/output.svg`
"""
from pathlib import Path
import tomli
benchmark_toml = (
(Path(__file__).parent.parent / "benchmark" / "data.toml").read_bytes().decode()
)
# Run this a few times to emphasize over imports and other overhead above.
for _ in range(1000):
tomli.loads(benchmark_toml)
hukkin-tomli-7940ff4/profiler/requirements.txt 0000664 0000000 0000000 00000000012 15130702260 0021565 0 ustar 00root root 0000000 0000000 gprof2dot
hukkin-tomli-7940ff4/pyproject.toml 0000664 0000000 0000000 00000011732 15130702260 0017406 0 ustar 00root root 0000000 0000000 [build-system]
requires = ["flit_core>=3.12,<4"]
build-backend = "flit_core.buildapi"
[project]
name = "tomli"
version = "2.4.0" # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT
description = "A lil' TOML parser"
authors = [
{ name = "Taneli Hukkinen", email = "hukkin@users.noreply.github.com" },
]
license = "MIT"
license-files = ["LICENSE"]
requires-python = ">=3.8"
readme = "README.md"
classifiers = [
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
keywords = ["toml"]
[project.urls]
"Homepage" = "https://github.com/hukkin/tomli"
"Changelog" = "https://github.com/hukkin/tomli/blob/master/CHANGELOG.md"
[tool.isort]
# Force imports to be sorted by module, independent of import type
force_sort_within_sections = true
# Group first party and local folder imports together
no_lines_before = ["LOCALFOLDER"]
# Configure isort to work without access to site-packages
known_first_party = ["tomli", "tests"]
# Settings for Black compatibility
profile = "black"
[tool.tox]
requires = ["tox>=4.21.1"]
# Only run unittest envs when no args given to tox
env_list = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
[tool.tox.env_run_base]
description = "run tests against a built package under {base_python}"
pass_env = ["TOMLI_USE_MYPYC"]
commands = [
["python", "-m", "unittest", { replace = "posargs", extend = true }],
]
[tool.tox.env."profile"]
description = "run profiler (use e.g. `firefox .tox/prof/output.svg` to open)"
deps = [
"-r profiler/requirements.txt",
]
allowlist_externals = [
"mkdir",
"dot",
]
commands = [
["mkdir", "-p", "{toxworkdir}/prof"],
["python", "-m", "cProfile", "-o", "{toxworkdir}/prof/output.pstats", "profiler/profiler_script.py"],
["gprof2dot", "-f", "pstats", "-o", "{toxworkdir}/prof/output.dot", "{toxworkdir}/prof/output.pstats"],
["dot", "-Tsvg", "-o", "{toxworkdir}/prof/output.svg", "{toxworkdir}/prof/output.dot"],
["python", "-c", 'import pathlib; print("profiler svg output under file://\{0\}".format(pathlib.Path(r"{toxworkdir}") / "prof" / "output.svg"))'],
]
[tool.tox.env."pre-commit"]
description = "run linters"
skip_install = true
deps = ["pre-commit"]
commands = [
["pre-commit", "run", { replace = "posargs", default = ["--all"], extend = true }],
]
[tool.tox.env."benchmark"]
description = "run the benchmark script against a local Tomli version"
deps = ["-r benchmark/requirements.txt"]
commands = [
["python", "-c", "import datetime; print(datetime.date.today())"],
["python", "--version"],
["python", "benchmark/run.py"],
]
[tool.tox.env."benchmark-pypi"]
description = "run the benchmark script against the latest Tomli in PyPI"
skip_install = true
deps = [
"tomli",
"-r benchmark/requirements.txt",
]
commands = [
["python", "-c", "import datetime; print(datetime.date.today())"],
["python", "--version"],
["python", "benchmark/run.py"],
]
[tool.tox.env."benchmark-import"]
description = "Measure module import times. Tox sends Python output to stderr, so to filter use e.g. `tox -e benchmark-import 2> >(grep tomli)`."
commands = [
["python", "-X", "importtime", "-c", "import tomli"],
]
[tool.tox.env."fuzz"]
description = 'run the fuzzer against a local Tomli version (needs "apt install clang")'
deps = [
"-r fuzzer/requirements.txt",
]
allowlist_externals = [
"mkdir",
"cp",
]
commands = [
# Create a folder for persistent corpus and use benchmark data as initial seed
["mkdir", "-p", "{toxworkdir}/fuzzer-corpus"],
["cp", "-n", "benchmark/data.toml", "{toxworkdir}/fuzzer-corpus/data.toml"],
# Run fuzzer
["python", "fuzzer/fuzz.py", "{toxworkdir}/fuzzer-corpus", { replace = "posargs", default = ["-len_control=10000"], extend = true }],
]
[tool.coverage.run]
branch = true
source = ['tomli']
[tool.coverage.report]
# Regexes for lines to exclude from consideration
exclude_lines = [
# Re-enable the standard pragma (with extra strictness)
'# pragma: no cover\b',
# Code for static type checkers
'if TYPE_CHECKING:',
# Scripts
'if __name__ == .__main__.:',
]
[tool.mypy]
show_error_codes = true
warn_unreachable = true
strict = true
strict_bytes = true
local_partial_types = true
# Disabling incremental mode is required for `warn_unused_configs = true`
# (implied by `strict = true`) to work
incremental = false
enable_error_code = ["ignore-without-code"]
[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false
[[tool.mypy.overrides]]
# This matches `benchmark/run.py`. Since benchmark/ is
# not a package, we use the module name here.
module = "run"
ignore_errors = true
[[tool.mypy.overrides]]
# This matches `fuzzer/fuzz.py`.
module = "fuzz"
ignore_errors = true
hukkin-tomli-7940ff4/scripts/ 0000775 0000000 0000000 00000000000 15130702260 0016155 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/scripts/mypyc_tox 0000775 0000000 0000000 00000002015 15130702260 0020134 0 ustar 00root root 0000000 0000000 #!/usr/bin/env python3
"""A tox wrapper to make it build Tomli with setuptools + mypyc.
Run this instead of tox. For example: `./scripts/mypyc_tox -e benchmark`
All arguments are passed to tox.
Prior to running tox, this edits the [build-system] table in pyproject.toml
to support mypyc builds. The change is reverted before exiting. This also
sets the `TOMLI_USE_MYPYC=1` environment variable that setup.py reads to
enable mypyc.
"""
import os
from pathlib import Path
import shutil
import subprocess
import sys
from use_setuptools import use_setuptools
project_root = Path(__file__).parent.parent
pyproject_path = project_root / "pyproject.toml"
backup_path = project_root / ".backup.pyproject.toml"
tox_env_vars = os.environ.copy()
tox_env_vars["TOMLI_USE_MYPYC"] = "1"
shutil.copy2(pyproject_path, backup_path)
try:
use_setuptools()
result = subprocess.run(["tox", *sys.argv[1:]], env=tox_env_vars)
raise SystemExit(result.returncode)
finally:
shutil.copy2(backup_path, pyproject_path)
backup_path.unlink()
hukkin-tomli-7940ff4/scripts/requirements.txt 0000664 0000000 0000000 00000000010 15130702260 0021430 0 ustar 00root root 0000000 0000000 tomli-w
hukkin-tomli-7940ff4/scripts/use_setuptools.py 0000664 0000000 0000000 00000001206 15130702260 0021623 0 ustar 00root root 0000000 0000000 """Script that switches build backend to setuptools with mypyc support.
Overwrites pyproject.toml. Does not create a backup.
"""
from pathlib import Path
import tomllib
import tomli_w # type: ignore[import-not-found]
def use_setuptools() -> None:
pyproject_path = Path(__file__).parent.parent / "pyproject.toml"
data = tomllib.loads(pyproject_path.read_bytes().decode())
data["build-system"] = {
"requires": ["setuptools>=77.0.3", "mypy[mypyc]>=1.15"],
"build-backend": "setuptools.build_meta",
}
pyproject_path.write_bytes(tomli_w.dumps(data).encode())
if __name__ == "__main__":
use_setuptools()
hukkin-tomli-7940ff4/setup.py 0000664 0000000 0000000 00000000477 15130702260 0016210 0 ustar 00root root 0000000 0000000 import os
from setuptools import setup # type: ignore[import-untyped]
if os.environ.get("TOMLI_USE_MYPYC") == "1":
import glob
from mypyc.build import mypycify
files = glob.glob("src/**/*.py", recursive=True)
ext_modules = mypycify(files)
else:
ext_modules = []
setup(ext_modules=ext_modules)
hukkin-tomli-7940ff4/src/ 0000775 0000000 0000000 00000000000 15130702260 0015255 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/src/tomli/ 0000775 0000000 0000000 00000000000 15130702260 0016401 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/src/tomli/__init__.py 0000664 0000000 0000000 00000000472 15130702260 0020515 0 ustar 00root root 0000000 0000000 # SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
# Licensed to PSF under a Contributor Agreement.
__all__ = ("loads", "load", "TOMLDecodeError")
__version__ = "2.4.0" # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT
from ._parser import TOMLDecodeError, load, loads
hukkin-tomli-7940ff4/src/tomli/_parser.py 0000664 0000000 0000000 00000062546 15130702260 0020423 0 ustar 00root root 0000000 0000000 # SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
# Licensed to PSF under a Contributor Agreement.
from __future__ import annotations
import sys
from types import MappingProxyType
from ._re import (
RE_DATETIME,
RE_LOCALTIME,
RE_NUMBER,
match_to_datetime,
match_to_localtime,
match_to_number,
)
TYPE_CHECKING = False
if TYPE_CHECKING:
from collections.abc import Iterable
from typing import IO, Any, Final
from ._types import Key, ParseFloat, Pos
# Inline tables/arrays are implemented using recursion. Pathologically
# nested documents cause pure Python to raise RecursionError (which is OK),
# but mypyc binary wheels will crash unrecoverably (not OK). According to
# mypyc docs this will be fixed in the future:
# https://mypyc.readthedocs.io/en/latest/differences_from_python.html#stack-overflows
# Before mypyc's fix is in, recursion needs to be limited by this library.
# Choosing `sys.getrecursionlimit()` as maximum inline table/array nesting
# level, as it allows more nesting than pure Python, but still seems a far
# lower number than where mypyc binaries crash.
MAX_INLINE_NESTING: Final = sys.getrecursionlimit()
ASCII_CTRL: Final = frozenset(chr(i) for i in range(32)) | frozenset(chr(127))
# Neither of these sets include quotation mark or backslash. They are
# currently handled as separate cases in the parser functions.
ILLEGAL_BASIC_STR_CHARS: Final = ASCII_CTRL - frozenset("\t")
ILLEGAL_MULTILINE_BASIC_STR_CHARS: Final = ASCII_CTRL - frozenset("\t\n")
ILLEGAL_LITERAL_STR_CHARS: Final = ILLEGAL_BASIC_STR_CHARS
ILLEGAL_MULTILINE_LITERAL_STR_CHARS: Final = ILLEGAL_MULTILINE_BASIC_STR_CHARS
ILLEGAL_COMMENT_CHARS: Final = ILLEGAL_BASIC_STR_CHARS
TOML_WS: Final = frozenset(" \t")
TOML_WS_AND_NEWLINE: Final = TOML_WS | frozenset("\n")
BARE_KEY_CHARS: Final = frozenset(
"abcdefghijklmnopqrstuvwxyz" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "0123456789" "-_"
)
KEY_INITIAL_CHARS: Final = BARE_KEY_CHARS | frozenset("\"'")
HEXDIGIT_CHARS: Final = frozenset("abcdef" "ABCDEF" "0123456789")
BASIC_STR_ESCAPE_REPLACEMENTS: Final = MappingProxyType(
{
"\\b": "\u0008", # backspace
"\\t": "\u0009", # tab
"\\n": "\u000a", # linefeed
"\\f": "\u000c", # form feed
"\\r": "\u000d", # carriage return
"\\e": "\u001b", # escape
'\\"': "\u0022", # quote
"\\\\": "\u005c", # backslash
}
)
class DEPRECATED_DEFAULT:
"""Sentinel to be used as default arg during deprecation
period of TOMLDecodeError's free-form arguments."""
class TOMLDecodeError(ValueError):
"""An error raised if a document is not valid TOML.
Adds the following attributes to ValueError:
msg: The unformatted error message
doc: The TOML document being parsed
pos: The index of doc where parsing failed
lineno: The line corresponding to pos
colno: The column corresponding to pos
"""
def __init__(
self,
msg: str | type[DEPRECATED_DEFAULT] = DEPRECATED_DEFAULT,
doc: str | type[DEPRECATED_DEFAULT] = DEPRECATED_DEFAULT,
pos: Pos | type[DEPRECATED_DEFAULT] = DEPRECATED_DEFAULT,
*args: Any,
):
if (
args
or not isinstance(msg, str)
or not isinstance(doc, str)
or not isinstance(pos, int)
):
import warnings
warnings.warn(
"Free-form arguments for TOMLDecodeError are deprecated. "
"Please set 'msg' (str), 'doc' (str) and 'pos' (int) arguments only.",
DeprecationWarning,
stacklevel=2,
)
if pos is not DEPRECATED_DEFAULT:
args = pos, *args
if doc is not DEPRECATED_DEFAULT:
args = doc, *args
if msg is not DEPRECATED_DEFAULT:
args = msg, *args
ValueError.__init__(self, *args)
return
lineno = doc.count("\n", 0, pos) + 1
if lineno == 1:
colno = pos + 1
else:
colno = pos - doc.rindex("\n", 0, pos)
if pos >= len(doc):
coord_repr = "end of document"
else:
coord_repr = f"line {lineno}, column {colno}"
errmsg = f"{msg} (at {coord_repr})"
ValueError.__init__(self, errmsg)
self.msg = msg
self.doc = doc
self.pos = pos
self.lineno = lineno
self.colno = colno
def load(__fp: IO[bytes], *, parse_float: ParseFloat = float) -> dict[str, Any]:
"""Parse TOML from a binary file object."""
b = __fp.read()
try:
s = b.decode()
except AttributeError:
raise TypeError(
"File must be opened in binary mode, e.g. use `open('foo.toml', 'rb')`"
) from None
return loads(s, parse_float=parse_float)
def loads(__s: str, *, parse_float: ParseFloat = float) -> dict[str, Any]:
"""Parse TOML from a string."""
# The spec allows converting "\r\n" to "\n", even in string
# literals. Let's do so to simplify parsing.
try:
src = __s.replace("\r\n", "\n")
except (AttributeError, TypeError):
raise TypeError(
f"Expected str object, not '{type(__s).__qualname__}'"
) from None
pos = 0
out = Output()
header: Key = ()
parse_float = make_safe_parse_float(parse_float)
# Parse one statement at a time
# (typically means one line in TOML source)
while True:
# 1. Skip line leading whitespace
pos = skip_chars(src, pos, TOML_WS)
# 2. Parse rules. Expect one of the following:
# - end of file
# - end of line
# - comment
# - key/value pair
# - append dict to list (and move to its namespace)
# - create dict (and move to its namespace)
# Skip trailing whitespace when applicable.
try:
char = src[pos]
except IndexError:
break
if char == "\n":
pos += 1
continue
if char in KEY_INITIAL_CHARS:
pos = key_value_rule(src, pos, out, header, parse_float)
pos = skip_chars(src, pos, TOML_WS)
elif char == "[":
try:
second_char: str | None = src[pos + 1]
except IndexError:
second_char = None
out.flags.finalize_pending()
if second_char == "[":
pos, header = create_list_rule(src, pos, out)
else:
pos, header = create_dict_rule(src, pos, out)
pos = skip_chars(src, pos, TOML_WS)
elif char != "#":
raise TOMLDecodeError("Invalid statement", src, pos)
# 3. Skip comment
pos = skip_comment(src, pos)
# 4. Expect end of line or end of file
try:
char = src[pos]
except IndexError:
break
if char != "\n":
raise TOMLDecodeError(
"Expected newline or end of document after a statement", src, pos
)
pos += 1
return out.data.dict
class Flags:
"""Flags that map to parsed keys/namespaces."""
# Marks an immutable namespace (inline array or inline table).
FROZEN: Final = 0
# Marks a nest that has been explicitly created and can no longer
# be opened using the "[table]" syntax.
EXPLICIT_NEST: Final = 1
def __init__(self) -> None:
self._flags: dict[str, dict[Any, Any]] = {}
self._pending_flags: set[tuple[Key, int]] = set()
def add_pending(self, key: Key, flag: int) -> None:
self._pending_flags.add((key, flag))
def finalize_pending(self) -> None:
for key, flag in self._pending_flags:
self.set(key, flag, recursive=False)
self._pending_flags.clear()
def unset_all(self, key: Key) -> None:
cont = self._flags
for k in key[:-1]:
if k not in cont:
return
cont = cont[k]["nested"]
cont.pop(key[-1], None)
def set(self, key: Key, flag: int, *, recursive: bool) -> None: # noqa: A003
cont = self._flags
key_parent, key_stem = key[:-1], key[-1]
for k in key_parent:
if k not in cont:
cont[k] = {"flags": set(), "recursive_flags": set(), "nested": {}}
cont = cont[k]["nested"]
if key_stem not in cont:
cont[key_stem] = {"flags": set(), "recursive_flags": set(), "nested": {}}
cont[key_stem]["recursive_flags" if recursive else "flags"].add(flag)
def is_(self, key: Key, flag: int) -> bool:
if not key:
return False # document root has no flags
cont = self._flags
for k in key[:-1]:
if k not in cont:
return False
inner_cont = cont[k]
if flag in inner_cont["recursive_flags"]:
return True
cont = inner_cont["nested"]
key_stem = key[-1]
if key_stem in cont:
inner_cont = cont[key_stem]
return flag in inner_cont["flags"] or flag in inner_cont["recursive_flags"]
return False
class NestedDict:
def __init__(self) -> None:
# The parsed content of the TOML document
self.dict: dict[str, Any] = {}
def get_or_create_nest(
self,
key: Key,
*,
access_lists: bool = True,
) -> dict[str, Any]:
cont: Any = self.dict
for k in key:
if k not in cont:
cont[k] = {}
cont = cont[k]
if access_lists and isinstance(cont, list):
cont = cont[-1]
if not isinstance(cont, dict):
raise KeyError("There is no nest behind this key")
return cont # type: ignore[no-any-return]
def append_nest_to_list(self, key: Key) -> None:
cont = self.get_or_create_nest(key[:-1])
last_key = key[-1]
if last_key in cont:
list_ = cont[last_key]
if not isinstance(list_, list):
raise KeyError("An object other than list found behind this key")
list_.append({})
else:
cont[last_key] = [{}]
class Output:
def __init__(self) -> None:
self.data = NestedDict()
self.flags = Flags()
def skip_chars(src: str, pos: Pos, chars: Iterable[str]) -> Pos:
try:
while src[pos] in chars:
pos += 1
except IndexError:
pass
return pos
def skip_until(
src: str,
pos: Pos,
expect: str,
*,
error_on: frozenset[str],
error_on_eof: bool,
) -> Pos:
try:
new_pos = src.index(expect, pos)
except ValueError:
new_pos = len(src)
if error_on_eof:
raise TOMLDecodeError(f"Expected {expect!r}", src, new_pos) from None
if not error_on.isdisjoint(src[pos:new_pos]):
while src[pos] not in error_on:
pos += 1
raise TOMLDecodeError(f"Found invalid character {src[pos]!r}", src, pos)
return new_pos
def skip_comment(src: str, pos: Pos) -> Pos:
try:
char: str | None = src[pos]
except IndexError:
char = None
if char == "#":
return skip_until(
src, pos + 1, "\n", error_on=ILLEGAL_COMMENT_CHARS, error_on_eof=False
)
return pos
def skip_comments_and_array_ws(src: str, pos: Pos) -> Pos:
while True:
pos_before_skip = pos
pos = skip_chars(src, pos, TOML_WS_AND_NEWLINE)
pos = skip_comment(src, pos)
if pos == pos_before_skip:
return pos
def create_dict_rule(src: str, pos: Pos, out: Output) -> tuple[Pos, Key]:
pos += 1 # Skip "["
pos = skip_chars(src, pos, TOML_WS)
pos, key = parse_key(src, pos)
if out.flags.is_(key, Flags.EXPLICIT_NEST) or out.flags.is_(key, Flags.FROZEN):
raise TOMLDecodeError(f"Cannot declare {key} twice", src, pos)
out.flags.set(key, Flags.EXPLICIT_NEST, recursive=False)
try:
out.data.get_or_create_nest(key)
except KeyError:
raise TOMLDecodeError("Cannot overwrite a value", src, pos) from None
if not src.startswith("]", pos):
raise TOMLDecodeError(
"Expected ']' at the end of a table declaration", src, pos
)
return pos + 1, key
def create_list_rule(src: str, pos: Pos, out: Output) -> tuple[Pos, Key]:
pos += 2 # Skip "[["
pos = skip_chars(src, pos, TOML_WS)
pos, key = parse_key(src, pos)
if out.flags.is_(key, Flags.FROZEN):
raise TOMLDecodeError(f"Cannot mutate immutable namespace {key}", src, pos)
# Free the namespace now that it points to another empty list item...
out.flags.unset_all(key)
# ...but this key precisely is still prohibited from table declaration
out.flags.set(key, Flags.EXPLICIT_NEST, recursive=False)
try:
out.data.append_nest_to_list(key)
except KeyError:
raise TOMLDecodeError("Cannot overwrite a value", src, pos) from None
if not src.startswith("]]", pos):
raise TOMLDecodeError(
"Expected ']]' at the end of an array declaration", src, pos
)
return pos + 2, key
def key_value_rule(
src: str, pos: Pos, out: Output, header: Key, parse_float: ParseFloat
) -> Pos:
pos, key, value = parse_key_value_pair(src, pos, parse_float, nest_lvl=0)
key_parent, key_stem = key[:-1], key[-1]
abs_key_parent = header + key_parent
relative_path_cont_keys = (header + key[:i] for i in range(1, len(key)))
for cont_key in relative_path_cont_keys:
# Check that dotted key syntax does not redefine an existing table
if out.flags.is_(cont_key, Flags.EXPLICIT_NEST):
raise TOMLDecodeError(f"Cannot redefine namespace {cont_key}", src, pos)
# Containers in the relative path can't be opened with the table syntax or
# dotted key/value syntax in following table sections.
out.flags.add_pending(cont_key, Flags.EXPLICIT_NEST)
if out.flags.is_(abs_key_parent, Flags.FROZEN):
raise TOMLDecodeError(
f"Cannot mutate immutable namespace {abs_key_parent}", src, pos
)
try:
nest = out.data.get_or_create_nest(abs_key_parent)
except KeyError:
raise TOMLDecodeError("Cannot overwrite a value", src, pos) from None
if key_stem in nest:
raise TOMLDecodeError("Cannot overwrite a value", src, pos)
# Mark inline table and array namespaces recursively immutable
if isinstance(value, (dict, list)):
out.flags.set(header + key, Flags.FROZEN, recursive=True)
nest[key_stem] = value
return pos
def parse_key_value_pair(
src: str, pos: Pos, parse_float: ParseFloat, nest_lvl: int
) -> tuple[Pos, Key, Any]:
pos, key = parse_key(src, pos)
try:
char: str | None = src[pos]
except IndexError:
char = None
if char != "=":
raise TOMLDecodeError("Expected '=' after a key in a key/value pair", src, pos)
pos += 1
pos = skip_chars(src, pos, TOML_WS)
pos, value = parse_value(src, pos, parse_float, nest_lvl)
return pos, key, value
def parse_key(src: str, pos: Pos) -> tuple[Pos, Key]:
pos, key_part = parse_key_part(src, pos)
key: Key = (key_part,)
pos = skip_chars(src, pos, TOML_WS)
while True:
try:
char: str | None = src[pos]
except IndexError:
char = None
if char != ".":
return pos, key
pos += 1
pos = skip_chars(src, pos, TOML_WS)
pos, key_part = parse_key_part(src, pos)
key += (key_part,)
pos = skip_chars(src, pos, TOML_WS)
def parse_key_part(src: str, pos: Pos) -> tuple[Pos, str]:
try:
char: str | None = src[pos]
except IndexError:
char = None
if char in BARE_KEY_CHARS:
start_pos = pos
pos = skip_chars(src, pos, BARE_KEY_CHARS)
return pos, src[start_pos:pos]
if char == "'":
return parse_literal_str(src, pos)
if char == '"':
return parse_one_line_basic_str(src, pos)
raise TOMLDecodeError("Invalid initial character for a key part", src, pos)
def parse_one_line_basic_str(src: str, pos: Pos) -> tuple[Pos, str]:
pos += 1
return parse_basic_str(src, pos, multiline=False)
def parse_array(
src: str, pos: Pos, parse_float: ParseFloat, nest_lvl: int
) -> tuple[Pos, list[Any]]:
pos += 1
array: list[Any] = []
pos = skip_comments_and_array_ws(src, pos)
if src.startswith("]", pos):
return pos + 1, array
while True:
pos, val = parse_value(src, pos, parse_float, nest_lvl)
array.append(val)
pos = skip_comments_and_array_ws(src, pos)
c = src[pos : pos + 1]
if c == "]":
return pos + 1, array
if c != ",":
raise TOMLDecodeError("Unclosed array", src, pos)
pos += 1
pos = skip_comments_and_array_ws(src, pos)
if src.startswith("]", pos):
return pos + 1, array
def parse_inline_table(
src: str, pos: Pos, parse_float: ParseFloat, nest_lvl: int
) -> tuple[Pos, dict[str, Any]]:
pos += 1
nested_dict = NestedDict()
flags = Flags()
pos = skip_comments_and_array_ws(src, pos)
if src.startswith("}", pos):
return pos + 1, nested_dict.dict
while True:
pos, key, value = parse_key_value_pair(src, pos, parse_float, nest_lvl)
key_parent, key_stem = key[:-1], key[-1]
if flags.is_(key, Flags.FROZEN):
raise TOMLDecodeError(f"Cannot mutate immutable namespace {key}", src, pos)
try:
nest = nested_dict.get_or_create_nest(key_parent, access_lists=False)
except KeyError:
raise TOMLDecodeError("Cannot overwrite a value", src, pos) from None
if key_stem in nest:
raise TOMLDecodeError(f"Duplicate inline table key {key_stem!r}", src, pos)
nest[key_stem] = value
pos = skip_comments_and_array_ws(src, pos)
c = src[pos : pos + 1]
if c == "}":
return pos + 1, nested_dict.dict
if c != ",":
raise TOMLDecodeError("Unclosed inline table", src, pos)
pos += 1
pos = skip_comments_and_array_ws(src, pos)
if src.startswith("}", pos):
return pos + 1, nested_dict.dict
if isinstance(value, (dict, list)):
flags.set(key, Flags.FROZEN, recursive=True)
def parse_basic_str_escape(
src: str, pos: Pos, *, multiline: bool = False
) -> tuple[Pos, str]:
escape_id = src[pos : pos + 2]
pos += 2
if multiline and escape_id in {"\\ ", "\\\t", "\\\n"}:
# Skip whitespace until next non-whitespace character or end of
# the doc. Error if non-whitespace is found before newline.
if escape_id != "\\\n":
pos = skip_chars(src, pos, TOML_WS)
try:
char = src[pos]
except IndexError:
return pos, ""
if char != "\n":
raise TOMLDecodeError("Unescaped '\\' in a string", src, pos)
pos += 1
pos = skip_chars(src, pos, TOML_WS_AND_NEWLINE)
return pos, ""
if escape_id == "\\x":
return parse_hex_char(src, pos, 2)
if escape_id == "\\u":
return parse_hex_char(src, pos, 4)
if escape_id == "\\U":
return parse_hex_char(src, pos, 8)
try:
return pos, BASIC_STR_ESCAPE_REPLACEMENTS[escape_id]
except KeyError:
raise TOMLDecodeError("Unescaped '\\' in a string", src, pos) from None
def parse_basic_str_escape_multiline(src: str, pos: Pos) -> tuple[Pos, str]:
return parse_basic_str_escape(src, pos, multiline=True)
def parse_hex_char(src: str, pos: Pos, hex_len: int) -> tuple[Pos, str]:
hex_str = src[pos : pos + hex_len]
if len(hex_str) != hex_len or not HEXDIGIT_CHARS.issuperset(hex_str):
raise TOMLDecodeError("Invalid hex value", src, pos)
pos += hex_len
hex_int = int(hex_str, 16)
if not is_unicode_scalar_value(hex_int):
raise TOMLDecodeError(
"Escaped character is not a Unicode scalar value", src, pos
)
return pos, chr(hex_int)
def parse_literal_str(src: str, pos: Pos) -> tuple[Pos, str]:
pos += 1 # Skip starting apostrophe
start_pos = pos
pos = skip_until(
src, pos, "'", error_on=ILLEGAL_LITERAL_STR_CHARS, error_on_eof=True
)
return pos + 1, src[start_pos:pos] # Skip ending apostrophe
def parse_multiline_str(src: str, pos: Pos, *, literal: bool) -> tuple[Pos, str]:
pos += 3
if src.startswith("\n", pos):
pos += 1
if literal:
delim = "'"
end_pos = skip_until(
src,
pos,
"'''",
error_on=ILLEGAL_MULTILINE_LITERAL_STR_CHARS,
error_on_eof=True,
)
result = src[pos:end_pos]
pos = end_pos + 3
else:
delim = '"'
pos, result = parse_basic_str(src, pos, multiline=True)
# Add at maximum two extra apostrophes/quotes if the end sequence
# is 4 or 5 chars long instead of just 3.
if not src.startswith(delim, pos):
return pos, result
pos += 1
if not src.startswith(delim, pos):
return pos, result + delim
pos += 1
return pos, result + (delim * 2)
def parse_basic_str(src: str, pos: Pos, *, multiline: bool) -> tuple[Pos, str]:
if multiline:
error_on = ILLEGAL_MULTILINE_BASIC_STR_CHARS
parse_escapes = parse_basic_str_escape_multiline
else:
error_on = ILLEGAL_BASIC_STR_CHARS
parse_escapes = parse_basic_str_escape
result = ""
start_pos = pos
while True:
try:
char = src[pos]
except IndexError:
raise TOMLDecodeError("Unterminated string", src, pos) from None
if char == '"':
if not multiline:
return pos + 1, result + src[start_pos:pos]
if src.startswith('"""', pos):
return pos + 3, result + src[start_pos:pos]
pos += 1
continue
if char == "\\":
result += src[start_pos:pos]
pos, parsed_escape = parse_escapes(src, pos)
result += parsed_escape
start_pos = pos
continue
if char in error_on:
raise TOMLDecodeError(f"Illegal character {char!r}", src, pos)
pos += 1
def parse_value(
src: str, pos: Pos, parse_float: ParseFloat, nest_lvl: int
) -> tuple[Pos, Any]:
if nest_lvl > MAX_INLINE_NESTING:
# Pure Python should have raised RecursionError already.
# This ensures mypyc binaries eventually do the same.
raise RecursionError( # pragma: no cover
"TOML inline arrays/tables are nested more than the allowed"
f" {MAX_INLINE_NESTING} levels"
)
try:
char: str | None = src[pos]
except IndexError:
char = None
# IMPORTANT: order conditions based on speed of checking and likelihood
# Basic strings
if char == '"':
if src.startswith('"""', pos):
return parse_multiline_str(src, pos, literal=False)
return parse_one_line_basic_str(src, pos)
# Literal strings
if char == "'":
if src.startswith("'''", pos):
return parse_multiline_str(src, pos, literal=True)
return parse_literal_str(src, pos)
# Booleans
if char == "t":
if src.startswith("true", pos):
return pos + 4, True
if char == "f":
if src.startswith("false", pos):
return pos + 5, False
# Arrays
if char == "[":
return parse_array(src, pos, parse_float, nest_lvl + 1)
# Inline tables
if char == "{":
return parse_inline_table(src, pos, parse_float, nest_lvl + 1)
# Dates and times
datetime_match = RE_DATETIME.match(src, pos)
if datetime_match:
try:
datetime_obj = match_to_datetime(datetime_match)
except ValueError as e:
raise TOMLDecodeError("Invalid date or datetime", src, pos) from e
return datetime_match.end(), datetime_obj
localtime_match = RE_LOCALTIME.match(src, pos)
if localtime_match:
return localtime_match.end(), match_to_localtime(localtime_match)
# Integers and "normal" floats.
# The regex will greedily match any type starting with a decimal
# char, so needs to be located after handling of dates and times.
number_match = RE_NUMBER.match(src, pos)
if number_match:
return number_match.end(), match_to_number(number_match, parse_float)
# Special floats
first_three = src[pos : pos + 3]
if first_three in {"inf", "nan"}:
return pos + 3, parse_float(first_three)
first_four = src[pos : pos + 4]
if first_four in {"-inf", "+inf", "-nan", "+nan"}:
return pos + 4, parse_float(first_four)
raise TOMLDecodeError("Invalid value", src, pos)
def is_unicode_scalar_value(codepoint: int) -> bool:
return (0 <= codepoint <= 55295) or (57344 <= codepoint <= 1114111)
def make_safe_parse_float(parse_float: ParseFloat) -> ParseFloat:
"""A decorator to make `parse_float` safe.
`parse_float` must not return dicts or lists, because these types
would be mixed with parsed TOML tables and arrays, thus confusing
the parser. The returned decorated callable raises `ValueError`
instead of returning illegal types.
"""
# The default `float` callable never returns illegal types. Optimize it.
if parse_float is float:
return float
def safe_parse_float(float_str: str) -> Any:
float_value = parse_float(float_str)
if isinstance(float_value, (dict, list)):
raise ValueError("parse_float must not return dicts or lists")
return float_value
return safe_parse_float
hukkin-tomli-7940ff4/src/tomli/_re.py 0000664 0000000 0000000 00000006504 15130702260 0017525 0 ustar 00root root 0000000 0000000 # SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
# Licensed to PSF under a Contributor Agreement.
from __future__ import annotations
from datetime import date, datetime, time, timedelta, timezone, tzinfo
from functools import lru_cache
import re
TYPE_CHECKING = False
if TYPE_CHECKING:
from typing import Any, Final
from ._types import ParseFloat
_TIME_RE_STR: Final = r"""
([01][0-9]|2[0-3]) # hours
:([0-5][0-9]) # minutes
(?:
:([0-5][0-9]) # optional seconds
(?:\.([0-9]{1,6})[0-9]*)? # optional fractions of a second
)?
"""
RE_NUMBER: Final = re.compile(
r"""
0
(?:
x[0-9A-Fa-f](?:_?[0-9A-Fa-f])* # hex
|
b[01](?:_?[01])* # bin
|
o[0-7](?:_?[0-7])* # oct
)
|
[+-]?(?:0|[1-9](?:_?[0-9])*) # dec, integer part
(?P
(?:\.[0-9](?:_?[0-9])*)? # optional fractional part
(?:[eE][+-]?[0-9](?:_?[0-9])*)? # optional exponent part
)
""",
flags=re.VERBOSE,
)
RE_LOCALTIME: Final = re.compile(_TIME_RE_STR, flags=re.VERBOSE)
RE_DATETIME: Final = re.compile(
rf"""
([0-9]{{4}})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01]) # date, e.g. 1988-10-27
(?:
[Tt ]
{_TIME_RE_STR}
(?:([Zz])|([+-])([01][0-9]|2[0-3]):([0-5][0-9]))? # optional time offset
)?
""",
flags=re.VERBOSE,
)
def match_to_datetime(match: re.Match[str]) -> datetime | date:
"""Convert a `RE_DATETIME` match to `datetime.datetime` or `datetime.date`.
Raises ValueError if the match does not correspond to a valid date
or datetime.
"""
(
year_str,
month_str,
day_str,
hour_str,
minute_str,
sec_str,
micros_str,
zulu_time,
offset_sign_str,
offset_hour_str,
offset_minute_str,
) = match.groups()
year, month, day = int(year_str), int(month_str), int(day_str)
if hour_str is None:
return date(year, month, day)
hour, minute = int(hour_str), int(minute_str)
sec = int(sec_str) if sec_str else 0
micros = int(micros_str.ljust(6, "0")) if micros_str else 0
if offset_sign_str:
tz: tzinfo | None = cached_tz(
offset_hour_str, offset_minute_str, offset_sign_str
)
elif zulu_time:
tz = timezone.utc
else: # local date-time
tz = None
return datetime(year, month, day, hour, minute, sec, micros, tzinfo=tz)
# No need to limit cache size. This is only ever called on input
# that matched RE_DATETIME, so there is an implicit bound of
# 24 (hours) * 60 (minutes) * 2 (offset direction) = 2880.
@lru_cache(maxsize=None)
def cached_tz(hour_str: str, minute_str: str, sign_str: str) -> timezone:
sign = 1 if sign_str == "+" else -1
return timezone(
timedelta(
hours=sign * int(hour_str),
minutes=sign * int(minute_str),
)
)
def match_to_localtime(match: re.Match[str]) -> time:
hour_str, minute_str, sec_str, micros_str = match.groups()
sec = int(sec_str) if sec_str else 0
micros = int(micros_str.ljust(6, "0")) if micros_str else 0
return time(int(hour_str), int(minute_str), sec, micros)
def match_to_number(match: re.Match[str], parse_float: ParseFloat) -> Any:
if match.group("floatpart"):
return parse_float(match.group())
return int(match.group(), 0)
hukkin-tomli-7940ff4/src/tomli/_types.py 0000664 0000000 0000000 00000000376 15130702260 0020264 0 ustar 00root root 0000000 0000000 # SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
# Licensed to PSF under a Contributor Agreement.
from typing import Any, Callable, Tuple
# Type annotations
ParseFloat = Callable[[str], Any]
Key = Tuple[str, ...]
Pos = int
hukkin-tomli-7940ff4/src/tomli/py.typed 0000664 0000000 0000000 00000000032 15130702260 0020073 0 ustar 00root root 0000000 0000000 # Marker file for PEP 561
hukkin-tomli-7940ff4/tests/ 0000775 0000000 0000000 00000000000 15130702260 0015630 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/__init__.py 0000664 0000000 0000000 00000000405 15130702260 0017740 0 ustar 00root root 0000000 0000000 # SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
# Licensed to PSF under a Contributor Agreement.
__all__ = ("tomllib",)
# By changing this one line, we can run the tests against
# a different module name.
import tomli as tomllib
hukkin-tomli-7940ff4/tests/burntsushi.py 0000664 0000000 0000000 00000006144 15130702260 0020415 0 ustar 00root root 0000000 0000000 # SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
# Licensed to PSF under a Contributor Agreement.
"""Utilities for tests that are in the "burntsushi" format."""
import datetime
from typing import Any
def convert(obj):
if isinstance(obj, str):
return {"type": "string", "value": obj}
elif isinstance(obj, bool):
return {"type": "bool", "value": str(obj).lower()}
elif isinstance(obj, int):
return {"type": "integer", "value": str(obj)}
elif isinstance(obj, float):
return {"type": "float", "value": _normalize_float_str(str(obj))}
elif isinstance(obj, datetime.datetime):
val = _normalize_datetime_str(obj.isoformat())
if obj.tzinfo:
return {"type": "datetime", "value": val}
return {"type": "datetime-local", "value": val}
elif isinstance(obj, datetime.time):
return {
"type": "time-local",
"value": _normalize_localtime_str(str(obj)),
}
elif isinstance(obj, datetime.date):
return {
"type": "date-local",
"value": str(obj),
}
elif isinstance(obj, list):
return [convert(i) for i in obj] # type: ignore[no-untyped-call]
elif isinstance(obj, dict):
return {k: convert(v) for k, v in obj.items()} # type: ignore[no-untyped-call]
raise Exception("unsupported type")
def normalize(obj: Any) -> Any:
"""Normalize test objects.
This normalizes primitive values (e.g. floats)."""
if isinstance(obj, list):
return [normalize(item) for item in obj]
if isinstance(obj, dict):
if "type" in obj and "value" in obj:
type_ = obj["type"]
value = obj["value"]
if type_ == "float":
norm_value = _normalize_float_str(value)
elif type_ in {"datetime", "datetime-local"}:
norm_value = _normalize_datetime_str(value)
elif type_ == "time-local":
norm_value = _normalize_localtime_str(value)
else:
norm_value = value
if type_ == "array":
return [normalize(item) for item in value]
return {"type": type_, "value": norm_value}
return {k: normalize(v) for k, v in obj.items()}
raise AssertionError("Burntsushi fixtures should be dicts/lists only")
def _normalize_datetime_str(dt_str: str) -> str:
if dt_str[-1].lower() == "z":
dt_str = dt_str[:-1] + "+00:00"
date = dt_str[:10]
rest = dt_str[11:]
if "+" in rest:
sign = "+"
elif "-" in rest:
sign = "-"
else:
sign = ""
if sign:
time, _, offset = rest.partition(sign)
else:
time = rest
offset = ""
time = time.rstrip("0") if "." in time else time
return date + "T" + time + sign + offset
def _normalize_localtime_str(lt_str: str) -> str:
return lt_str.rstrip("0") if "." in lt_str else lt_str
def _normalize_float_str(float_str: str) -> str:
as_float = float(float_str)
# Normalize "-0.0" and "+0.0"
if as_float == 0:
return "0"
return str(as_float)
hukkin-tomli-7940ff4/tests/data/ 0000775 0000000 0000000 00000000000 15130702260 0016541 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/ 0000775 0000000 0000000 00000000000 15130702260 0020167 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/ 0000775 0000000 0000000 00000000000 15130702260 0022150 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/ 0000775 0000000 0000000 00000000000 15130702260 0024100 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/LICENSE 0000664 0000000 0000000 00000002067 15130702260 0025112 0 ustar 00root root 0000000 0000000 The MIT License (MIT)
Copyright (c) 2018 TOML authors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/ 0000775 0000000 0000000 00000000000 15130702260 0025526 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/array/ 0000775 0000000 0000000 00000000000 15130702260 0026644 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/array/double-comma-01.toml 0000664 0000000 0000000 00000000031 15130702260 0032315 0 ustar 00root root 0000000 0000000 double-comma-01 = [1,,2]
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/array/double-comma-02.toml 0000664 0000000 0000000 00000000032 15130702260 0032317 0 ustar 00root root 0000000 0000000 double-comma-02 = [1,2,,]
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/array/extend-defined-aot.toml 0000664 0000000 0000000 00000000035 15130702260 0033203 0 ustar 00root root 0000000 0000000 [[tab.arr]]
[tab]
arr.val1=1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/array/extending-table.toml 0000664 0000000 0000000 00000000172 15130702260 0032613 0 ustar 00root root 0000000 0000000 a = [{ b = 1 }]
# Cannot extend tables within static arrays
# https://github.com/toml-lang/toml/issues/908
[a.c]
foo = 1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/array/missing-separator-01.toml 0000664 0000000 0000000 00000000024 15130702260 0033422 0 ustar 00root root 0000000 0000000 arrr = [true false]
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/array/missing-separator-02.toml 0000664 0000000 0000000 00000000022 15130702260 0033421 0 ustar 00root root 0000000 0000000 wrong = [ 1 2 3 ]
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/array/no-close-01.toml 0000664 0000000 0000000 00000000030 15130702260 0031467 0 ustar 00root root 0000000 0000000 no-close-01 = [ 1, 2, 3
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/array/no-close-02.toml 0000664 0000000 0000000 00000000022 15130702260 0031471 0 ustar 00root root 0000000 0000000 no-close-02 = [1,
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/array/no-close-03.toml 0000664 0000000 0000000 00000000025 15130702260 0031475 0 ustar 00root root 0000000 0000000 no-close-03 = [42 #]
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/array/no-close-04.toml 0000664 0000000 0000000 00000000032 15130702260 0031474 0 ustar 00root root 0000000 0000000 no-close-04 = [{ key = 42
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/array/no-close-05.toml 0000664 0000000 0000000 00000000033 15130702260 0031476 0 ustar 00root root 0000000 0000000 no-close-05 = [{ key = 42}
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/array/no-close-06.toml 0000664 0000000 0000000 00000000036 15130702260 0031502 0 ustar 00root root 0000000 0000000 no-close-06 = [{ key = 42 #}]
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/array/no-close-07.toml 0000664 0000000 0000000 00000000036 15130702260 0031503 0 ustar 00root root 0000000 0000000 no-close-07 = [{ key = 42} #]
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/array/no-close-08.toml 0000664 0000000 0000000 00000000020 15130702260 0031475 0 ustar 00root root 0000000 0000000 no-close-08 = [
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/array/no-close-table-01.toml 0000664 0000000 0000000 00000000020 15130702260 0032553 0 ustar 00root root 0000000 0000000 x = [{ key = 42
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/array/no-close-table-02.toml 0000664 0000000 0000000 00000000022 15130702260 0032556 0 ustar 00root root 0000000 0000000 x = [{ key = 42 #
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/array/no-comma-01.toml 0000664 0000000 0000000 00000000033 15130702260 0031461 0 ustar 00root root 0000000 0000000 no-comma-01 = [true false]
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/array/no-comma-02.toml 0000664 0000000 0000000 00000000030 15130702260 0031457 0 ustar 00root root 0000000 0000000 no-comma-02 = [ 1 2 3 ]
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/array/no-comma-03.toml 0000664 0000000 0000000 00000000026 15130702260 0031465 0 ustar 00root root 0000000 0000000 no-comma-03 = [ 1 #,]
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/array/only-comma-01.toml 0000664 0000000 0000000 00000000024 15130702260 0032026 0 ustar 00root root 0000000 0000000 only-comma-01 = [,]
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/array/only-comma-02.toml 0000664 0000000 0000000 00000000025 15130702260 0032030 0 ustar 00root root 0000000 0000000 only-comma-02 = [,,]
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/array/tables-01.toml 0000664 0000000 0000000 00000000067 15130702260 0031234 0 ustar 00root root 0000000 0000000 # INVALID TOML DOC
fruit = []
[[fruit]] # Not allowed
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/array/tables-02.toml 0000664 0000000 0000000 00000000274 15130702260 0031235 0 ustar 00root root 0000000 0000000 # INVALID TOML DOC
[[fruit]]
name = "apple"
[[fruit.variety]]
name = "red delicious"
# This table conflicts with the previous table
[fruit.variety]
name = "granny smith"
text-after-array-entries.toml 0000664 0000000 0000000 00000000106 15130702260 0034325 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/array array = [
"Is there life after an array separator?", No
"Entry"
]
text-before-array-separator.toml 0000664 0000000 0000000 00000000107 15130702260 0035016 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/array array = [
"Is there life before an array separator?" No,
"Entry"
]
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/array/text-in-array.toml 0000664 0000000 0000000 00000000070 15130702260 0032242 0 ustar 00root root 0000000 0000000 array = [
"Entry 1",
I don't belong,
"Entry 2",
]
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/bool/ 0000775 0000000 0000000 00000000000 15130702260 0026461 5 ustar 00root root 0000000 0000000 almost-false-with-extra.toml 0000664 0000000 0000000 00000000042 15130702260 0033754 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/bool almost-false-with-extra = falsify
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/bool/almost-false.toml 0000664 0000000 0000000 00000000037 15130702260 0031745 0 ustar 00root root 0000000 0000000 almost-false = fals
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/bool/almost-true-with-extra.toml0000664 0000000 0000000 00000000041 15130702260 0033717 0 ustar 00root root 0000000 0000000 almost-true-with-extra = truthy
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/bool/almost-true.toml 0000664 0000000 0000000 00000000036 15130702260 0031631 0 ustar 00root root 0000000 0000000 almost-true = tru
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/bool/capitalized-false.toml 0000664 0000000 0000000 00000000041 15130702260 0032732 0 ustar 00root root 0000000 0000000 capitalized-false = False
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/bool/capitalized-true.toml 0000664 0000000 0000000 00000000040 15130702260 0032616 0 ustar 00root root 0000000 0000000 capitalized-true = True
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/bool/just-f.toml 0000664 0000000 0000000 00000000034 15130702260 0030563 0 ustar 00root root 0000000 0000000 just-f = f
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/bool/just-t.toml 0000664 0000000 0000000 00000000034 15130702260 0030601 0 ustar 00root root 0000000 0000000 just-t = t
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/bool/mixed-case-false.toml 0000664 0000000 0000000 00000000040 15130702260 0032457 0 ustar 00root root 0000000 0000000 mixed-case-false = falsE
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/bool/mixed-case-true.toml 0000664 0000000 0000000 00000000037 15130702260 0032352 0 ustar 00root root 0000000 0000000 mixed-case-true = trUe
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/bool/mixed-case.toml 0000664 0000000 0000000 00000000052 15130702260 0031372 0 ustar 00root root 0000000 0000000 mixed-case = valid = False
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/bool/starting-same-false.toml 0000664 0000000 0000000 00000000041 15130702260 0033217 0 ustar 00root root 0000000 0000000 starting-same-false = falsey
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/bool/starting-same-true.toml 0000664 0000000 0000000 00000000040 15130702260 0033103 0 ustar 00root root 0000000 0000000 starting-same-true = truer
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/bool/wrong-case-false.toml 0000664 0000000 0000000 00000000040 15130702260 0032505 0 ustar 00root root 0000000 0000000 wrong-case-false = FALSE
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/bool/wrong-case-true.toml 0000664 0000000 0000000 00000000037 15130702260 0032400 0 ustar 00root root 0000000 0000000 wrong-case-true = TRUE
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/control/ 0000775 0000000 0000000 00000000000 15130702260 0027206 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/control/bare-cr.toml 0000664 0000000 0000000 00000000113 15130702260 0031411 0 ustar 00root root 0000000 0000000 # The following line contains a single carriage return control character
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/control/bare-formfeed.toml 0000664 0000000 0000000 00000000026 15130702260 0032577 0 ustar 00root root 0000000 0000000 bare-formfeed =
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/control/bare-null.toml 0000664 0000000 0000000 00000000043 15130702260 0031761 0 ustar 00root root 0000000 0000000 bare-null = "some value"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/control/bare-vertical-tab.toml 0000664 0000000 0000000 00000000026 15130702260 0033365 0 ustar 00root root 0000000 0000000 bare-vertical-tab =
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/control/comment-cr.toml 0000664 0000000 0000000 00000000063 15130702260 0032146 0 ustar 00root root 0000000 0000000 comment-cr = "Carriage return in comment" #
a=1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/control/comment-del.toml 0000664 0000000 0000000 00000000034 15130702260 0032304 0 ustar 00root root 0000000 0000000 comment-del = "0x7f" #
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/control/comment-ff.toml 0000664 0000000 0000000 00000000034 15130702260 0032133 0 ustar 00root root 0000000 0000000 comment-ff = "0x7f" #
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/control/comment-lf.toml 0000664 0000000 0000000 00000000034 15130702260 0032141 0 ustar 00root root 0000000 0000000 comment-lf = "ctrl-P" #
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/control/comment-null.toml 0000664 0000000 0000000 00000000034 15130702260 0032512 0 ustar 00root root 0000000 0000000 comment-null = "null" #
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/control/comment-us.toml 0000664 0000000 0000000 00000000034 15130702260 0032167 0 ustar 00root root 0000000 0000000 comment-us = "ctrl-_" #
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/control/multi-cr.toml 0000664 0000000 0000000 00000000031 15130702260 0031631 0 ustar 00root root 0000000 0000000 multi-cr = """null
"""
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/control/multi-del.toml 0000664 0000000 0000000 00000000031 15130702260 0031771 0 ustar 00root root 0000000 0000000 multi-del = """null"""
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/control/multi-lf.toml 0000664 0000000 0000000 00000000031 15130702260 0031626 0 ustar 00root root 0000000 0000000 multi-lf = """null"""
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/control/multi-null.toml 0000664 0000000 0000000 00000000031 15130702260 0032177 0 ustar 00root root 0000000 0000000 multi-null = """null """
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/control/multi-us.toml 0000664 0000000 0000000 00000000031 15130702260 0031654 0 ustar 00root root 0000000 0000000 multi-us = """null"""
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/control/only-ff.toml 0000664 0000000 0000000 00000000001 15130702260 0031444 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/control/only-null.toml 0000664 0000000 0000000 00000000001 15130702260 0032023 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/control/only-vt.toml 0000664 0000000 0000000 00000000001 15130702260 0031502 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/control/rawmulti-cr.toml 0000664 0000000 0000000 00000000034 15130702260 0032346 0 ustar 00root root 0000000 0000000 rawmulti-cr = '''null
'''
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/control/rawmulti-del.toml 0000664 0000000 0000000 00000000034 15130702260 0032506 0 ustar 00root root 0000000 0000000 rawmulti-del = '''null'''
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/control/rawmulti-lf.toml 0000664 0000000 0000000 00000000034 15130702260 0032343 0 ustar 00root root 0000000 0000000 rawmulti-lf = '''null'''
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/control/rawmulti-null.toml 0000664 0000000 0000000 00000000034 15130702260 0032714 0 ustar 00root root 0000000 0000000 rawmulti-null = '''null '''
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/control/rawmulti-us.toml 0000664 0000000 0000000 00000000034 15130702260 0032371 0 ustar 00root root 0000000 0000000 rawmulti-us = '''null'''
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/control/rawstring-cr.toml 0000664 0000000 0000000 00000000031 15130702260 0032517 0 ustar 00root root 0000000 0000000 rawstring-cr = 'null
'
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/control/rawstring-del.toml 0000664 0000000 0000000 00000000031 15130702260 0032657 0 ustar 00root root 0000000 0000000 rawstring-del = 'null'
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/control/rawstring-lf.toml 0000664 0000000 0000000 00000000031 15130702260 0032514 0 ustar 00root root 0000000 0000000 rawstring-lf = 'null'
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/control/rawstring-null.toml 0000664 0000000 0000000 00000000031 15130702260 0033065 0 ustar 00root root 0000000 0000000 rawstring-null = 'null '
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/control/rawstring-us.toml 0000664 0000000 0000000 00000000031 15130702260 0032542 0 ustar 00root root 0000000 0000000 rawstring-us = 'null'
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/control/string-bs.toml 0000664 0000000 0000000 00000000033 15130702260 0032007 0 ustar 00root root 0000000 0000000 string-bs = "backspace"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/control/string-cr.toml 0000664 0000000 0000000 00000000026 15130702260 0032011 0 ustar 00root root 0000000 0000000 string-cr = "null
"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/control/string-del.toml 0000664 0000000 0000000 00000000026 15130702260 0032151 0 ustar 00root root 0000000 0000000 string-del = "null"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/control/string-lf.toml 0000664 0000000 0000000 00000000026 15130702260 0032006 0 ustar 00root root 0000000 0000000 string-lf = "null"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/control/string-null.toml 0000664 0000000 0000000 00000000026 15130702260 0032357 0 ustar 00root root 0000000 0000000 string-null = "null "
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/control/string-us.toml 0000664 0000000 0000000 00000000026 15130702260 0032034 0 ustar 00root root 0000000 0000000 string-us = "null"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/datetime/ 0000775 0000000 0000000 00000000000 15130702260 0027322 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/datetime/day-zero.toml 0000664 0000000 0000000 00000000036 15130702260 0031750 0 ustar 00root root 0000000 0000000 foo = 1997-09-00T09:09:09.09Z
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/datetime/feb-29.toml 0000664 0000000 0000000 00000000051 15130702260 0031177 0 ustar 00root root 0000000 0000000 "not a leap year" = 2100-02-29T15:15:15Z
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/datetime/feb-30.toml 0000664 0000000 0000000 00000000070 15130702260 0031170 0 ustar 00root root 0000000 0000000 "only 28 or 29 days in february" = 1988-02-30T15:15:15Z
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/datetime/hour-over.toml 0000664 0000000 0000000 00000000102 15130702260 0032136 0 ustar 00root root 0000000 0000000 # time-hour = 2DIGIT ; 00-23
d = 2006-01-01T24:00:00-00:00
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/datetime/mday-over.toml 0000664 0000000 0000000 00000000211 15130702260 0032114 0 ustar 00root root 0000000 0000000 # date-mday = 2DIGIT ; 01-28, 01-29, 01-30, 01-31 based on
# ; month/year
d = 2006-01-32T00:00:00-00:00
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/datetime/mday-under.toml 0000664 0000000 0000000 00000000211 15130702260 0032256 0 ustar 00root root 0000000 0000000 # date-mday = 2DIGIT ; 01-28, 01-29, 01-30, 01-31 based on
# ; month/year
d = 2006-01-00T00:00:00-00:00
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/datetime/minute-over.toml 0000664 0000000 0000000 00000000102 15130702260 0032462 0 ustar 00root root 0000000 0000000 # time-minute = 2DIGIT ; 00-59
d = 2006-01-01T00:60:00-00:00
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/datetime/month-over.toml 0000664 0000000 0000000 00000000102 15130702260 0032306 0 ustar 00root root 0000000 0000000 # date-month = 2DIGIT ; 01-12
d = 2006-13-01T00:00:00-00:00
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/datetime/month-under.toml 0000664 0000000 0000000 00000000102 15130702260 0032450 0 ustar 00root root 0000000 0000000 # date-month = 2DIGIT ; 01-12
d = 2007-00-01T00:00:00-00:00
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/datetime/no-date-time-sep.toml 0000664 0000000 0000000 00000000031 15130702260 0033261 0 ustar 00root root 0000000 0000000 foo = 1997-09-0909:09:09
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/datetime/no-leads-month.toml 0000664 0000000 0000000 00000000132 15130702260 0033040 0 ustar 00root root 0000000 0000000 # Month "7" instead of "07"; the leading zero is required.
no-leads = 1987-7-05T17:45:00Z
no-leads-with-milli.toml 0000664 0000000 0000000 00000000135 15130702260 0033716 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/datetime # Day "5" instead of "05"; the leading zero is required.
with-milli = 1987-07-5T17:45:00.12Z
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/datetime/no-leads.toml 0000664 0000000 0000000 00000000132 15130702260 0031715 0 ustar 00root root 0000000 0000000 # Month "7" instead of "07"; the leading zero is required.
no-leads = 1987-7-05T17:45:00Z
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/datetime/no-t.toml 0000664 0000000 0000000 00000000106 15130702260 0031071 0 ustar 00root root 0000000 0000000 # No "t" or "T" between the date and time.
no-t = 1987-07-0517:45:00Z
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/datetime/no-year-month-sep.toml 0000664 0000000 0000000 00000000020 15130702260 0033471 0 ustar 00root root 0000000 0000000 foo = 199709-09
offset-minus-minute-1digit.toml 0000664 0000000 0000000 00000000042 15130702260 0035231 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/datetime foo = 1997-09-09T09:09:09.09+09:9
offset-minus-no-hour-minute-sep.toml 0000664 0000000 0000000 00000000042 15130702260 0036224 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/datetime foo = 1997-09-09T09:09:09.09+0909
offset-minus-no-hour-minute.toml 0000664 0000000 0000000 00000000036 15130702260 0035442 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/datetime foo = 1997-09-09T09:09:09.09+
offset-minus-no-minute.toml 0000664 0000000 0000000 00000000040 15130702260 0034462 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/datetime foo = 1997-09-09T09:09:09.09+09
offset-overflow-hour.toml 0000664 0000000 0000000 00000000063 15130702260 0034241 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/datetime # Hour must be 00-24
d = 1985-06-18 17:04:07+25:00
offset-overflow-minute.toml 0000664 0000000 0000000 00000000036 15130702260 0034565 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/datetime d = 1985-06-18 17:04:07+12:60
offset-plus-minute-1digit.toml 0000664 0000000 0000000 00000000042 15130702260 0035061 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/datetime foo = 1997-09-09T09:09:09.09+09:9
offset-plus-no-hour-minute-sep.toml 0000664 0000000 0000000 00000000042 15130702260 0036054 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/datetime foo = 1997-09-09T09:09:09.09+0909
offset-plus-no-hour-minute.toml 0000664 0000000 0000000 00000000036 15130702260 0035272 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/datetime foo = 1997-09-09T09:09:09.09+
offset-plus-no-minute.toml 0000664 0000000 0000000 00000000040 15130702260 0034312 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/datetime foo = 1997-09-09T09:09:09.09+09
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/datetime/only-T.toml 0000664 0000000 0000000 00000000010 15130702260 0031370 0 ustar 00root root 0000000 0000000 foo = T
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/datetime/only-TZ.toml 0000664 0000000 0000000 00000000011 15130702260 0031523 0 ustar 00root root 0000000 0000000 foo = TZ
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/datetime/only-Tdot.toml 0000664 0000000 0000000 00000000011 15130702260 0032100 0 ustar 00root root 0000000 0000000 foo = T.
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/datetime/second-over.toml 0000664 0000000 0000000 00000000211 15130702260 0032435 0 ustar 00root root 0000000 0000000 # time-second = 2DIGIT ; 00-58, 00-59, 00-60 based on leap second
# ; rules
d = 2006-01-01T00:00:61-00:00
second-trailing-dot.toml 0000664 0000000 0000000 00000000033 15130702260 0034002 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/datetime foo = 1997-09-09T09:09:09.
second-trailing-dotz.toml 0000664 0000000 0000000 00000000034 15130702260 0034175 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/datetime foo = 2016-09-09T09:09:09.Z
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/datetime/time-no-leads.toml 0000664 0000000 0000000 00000000070 15130702260 0032652 0 ustar 00root root 0000000 0000000 # Leading 0 is always required.
d = 2023-10-01T1:32:00Z
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/datetime/trailing-x.toml 0000664 0000000 0000000 00000000021 15130702260 0032266 0 ustar 00root root 0000000 0000000 sign=2020-01-01x
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/datetime/y10k.toml 0000664 0000000 0000000 00000000072 15130702260 0031002 0 ustar 00root root 0000000 0000000 # Maximum RFC3399 year is 9999.
d = 10000-01-01 00:00:00z
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/encoding/ 0000775 0000000 0000000 00000000000 15130702260 0027314 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/encoding/bad-codepoint.toml 0000664 0000000 0000000 00000000041 15130702260 0032714 0 ustar 00root root 0000000 0000000 # Invalid codepoint U+D800 :
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/encoding/bad-utf8-at-end.toml 0000664 0000000 0000000 00000000362 15130702260 0032772 0 ustar 00root root 0000000 0000000 # There is a 0xda at after the quotes, and no EOL at the end of the file.
#
# This is a bit of an edge case: This indicates there should be two bytes
# (0b1101_1010) but there is no byte to follow because it's the end of the file.
x = """""" hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/encoding/bad-utf8-in-array.toml 0000664 0000000 0000000 00000000125 15130702260 0033341 0 ustar 00root root 0000000 0000000 # https://github.com/marzer/tomlplusplus/issues/100
fl =[ [[[[[[[[[[[[[[[6 -6 bad-utf8-in-comment.toml 0000664 0000000 0000000 00000000004 15130702260 0033602 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/encoding #
bad-utf8-in-multiline-literal.toml 0000664 0000000 0000000 00000000107 15130702260 0035600 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/encoding # The following line contains an invalid UTF-8 sequence.
bad = ''''''
bad-utf8-in-multiline.toml 0000664 0000000 0000000 00000000107 15130702260 0034146 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/encoding # The following line contains an invalid UTF-8 sequence.
bad = """"""
bad-utf8-in-string-literal.toml 0000664 0000000 0000000 00000000103 15130702260 0035100 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/encoding # The following line contains an invalid UTF-8 sequence.
bad = ''
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/encoding/bad-utf8-in-string.toml0000664 0000000 0000000 00000000103 15130702260 0033525 0 ustar 00root root 0000000 0000000 # The following line contains an invalid UTF-8 sequence.
bad = ""
bom-not-at-start-01.toml 0000664 0000000 0000000 00000000024 15130702260 0033454 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/encoding bom-not-at-start
bom-not-at-start-02.toml 0000664 0000000 0000000 00000000025 15130702260 0033456 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/encoding bom-not-at-start=
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/encoding/ideographic-space.toml 0000664 0000000 0000000 00000000100 15130702260 0033547 0 ustar 00root root 0000000 0000000 # First on next line is U+3000 IDEOGRAPHIC SPACE
foo = "bar"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/encoding/utf16-bom.toml 0000664 0000000 0000000 00000000046 15130702260 0031731 0 ustar 00root root 0000000 0000000 # U T F - 1 6 w i t h B O M
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/encoding/utf16-comment.toml 0000664 0000000 0000000 00000000052 15130702260 0032613 0 ustar 00root root 0000000 0000000 # U T F - 1 6 w i t h o u t B O M
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/encoding/utf16-key.toml 0000664 0000000 0000000 00000000020 15130702260 0031734 0 ustar 00root root 0000000 0000000 k = " v "
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/ 0000775 0000000 0000000 00000000000 15130702260 0026633 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/double-dot-01.toml 0000664 0000000 0000000 00000000025 15130702260 0032001 0 ustar 00root root 0000000 0000000 double-dot-01 = 0..1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/double-dot-02.toml 0000664 0000000 0000000 00000000026 15130702260 0032003 0 ustar 00root root 0000000 0000000 double-dot-02 = 0.1.2
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/exp-dot-01.toml 0000664 0000000 0000000 00000000023 15130702260 0031321 0 ustar 00root root 0000000 0000000 exp-dot-01 = 1e2.3
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/exp-dot-02.toml 0000664 0000000 0000000 00000000022 15130702260 0031321 0 ustar 00root root 0000000 0000000 exp-dot-02 = 1.e2
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/exp-dot-03.toml 0000664 0000000 0000000 00000000024 15130702260 0031324 0 ustar 00root root 0000000 0000000 exp-dot-03 = 3.e+20
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/exp-double-e-01.toml 0000664 0000000 0000000 00000000027 15130702260 0032233 0 ustar 00root root 0000000 0000000 exp-double-e-01 = 1ee2
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/exp-double-e-02.toml 0000664 0000000 0000000 00000000030 15130702260 0032226 0 ustar 00root root 0000000 0000000 exp-double-e-02 = 1e2e3
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/exp-double-us.toml 0000664 0000000 0000000 00000000027 15130702260 0032220 0 ustar 00root root 0000000 0000000 exp-double-us = 1e__23
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/exp-leading-us.toml 0000664 0000000 0000000 00000000027 15130702260 0032351 0 ustar 00root root 0000000 0000000 exp-leading-us = 1e_23
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/exp-trailing-us-01.toml 0000664 0000000 0000000 00000000032 15130702260 0032771 0 ustar 00root root 0000000 0000000 exp-trailing-us-01 = 1_e2
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/exp-trailing-us-02.toml 0000664 0000000 0000000 00000000034 15130702260 0032774 0 ustar 00root root 0000000 0000000 exp-trailing-us-02 = 1.2_e2
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/exp-trailing-us.toml 0000664 0000000 0000000 00000000030 15130702260 0032551 0 ustar 00root root 0000000 0000000 exp-trailing-us = 1e23_
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/inf-capital.toml 0000664 0000000 0000000 00000000010 15130702260 0031706 0 ustar 00root root 0000000 0000000 v = Inf
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/inf-incomplete-01.toml 0000664 0000000 0000000 00000000027 15130702260 0032656 0 ustar 00root root 0000000 0000000 inf-incomplete-01 = in
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/inf-incomplete-02.toml 0000664 0000000 0000000 00000000030 15130702260 0032651 0 ustar 00root root 0000000 0000000 inf-incomplete-02 = +in
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/inf-incomplete-03.toml 0000664 0000000 0000000 00000000030 15130702260 0032652 0 ustar 00root root 0000000 0000000 inf-incomplete-03 = -in
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/inf_underscore.toml 0000664 0000000 0000000 00000000026 15130702260 0032533 0 ustar 00root root 0000000 0000000 inf_underscore = in_f
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/leading-dot-neg.toml 0000664 0000000 0000000 00000000032 15130702260 0032461 0 ustar 00root root 0000000 0000000 leading-dot-neg = -.12345
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/leading-dot-plus.toml 0000664 0000000 0000000 00000000033 15130702260 0032674 0 ustar 00root root 0000000 0000000 leading-dot-plus = +.12345
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/leading-dot.toml 0000664 0000000 0000000 00000000025 15130702260 0031714 0 ustar 00root root 0000000 0000000 leading-dot = .12345
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/leading-us.toml 0000664 0000000 0000000 00000000022 15130702260 0031552 0 ustar 00root root 0000000 0000000 leading-us = _1.2
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/leading-zero-neg.toml 0000664 0000000 0000000 00000000032 15130702260 0032652 0 ustar 00root root 0000000 0000000 leading-zero-neg = -03.14
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/leading-zero-plus.toml 0000664 0000000 0000000 00000000033 15130702260 0033065 0 ustar 00root root 0000000 0000000 leading-zero-plus = +03.14
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/leading-zero.toml 0000664 0000000 0000000 00000000025 15130702260 0032105 0 ustar 00root root 0000000 0000000 leading-zero = 03.14
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/nan-capital.toml 0000664 0000000 0000000 00000000010 15130702260 0031706 0 ustar 00root root 0000000 0000000 v = NaN
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/nan-incomplete-01.toml 0000664 0000000 0000000 00000000027 15130702260 0032656 0 ustar 00root root 0000000 0000000 nan-incomplete-01 = na
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/nan-incomplete-02.toml 0000664 0000000 0000000 00000000030 15130702260 0032651 0 ustar 00root root 0000000 0000000 nan-incomplete-02 = +na
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/nan-incomplete-03.toml 0000664 0000000 0000000 00000000030 15130702260 0032652 0 ustar 00root root 0000000 0000000 nan-incomplete-03 = -na
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/nan_underscore.toml 0000664 0000000 0000000 00000000026 15130702260 0032533 0 ustar 00root root 0000000 0000000 nan_underscore = na_n
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/trailing-dot-01.toml 0000664 0000000 0000000 00000000024 15130702260 0032337 0 ustar 00root root 0000000 0000000 trailing-point = 1.
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/trailing-dot-02.toml 0000664 0000000 0000000 00000000015 15130702260 0032340 0 ustar 00root root 0000000 0000000 a = 1.
b = 2
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/trailing-dot-min.toml 0000664 0000000 0000000 00000000027 15130702260 0032705 0 ustar 00root root 0000000 0000000 trailing-dot-min = -1.
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/trailing-dot-plus.toml 0000664 0000000 0000000 00000000030 15130702260 0033077 0 ustar 00root root 0000000 0000000 trailing-dot-plus = +1.
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/trailing-dot.toml 0000664 0000000 0000000 00000000022 15130702260 0032117 0 ustar 00root root 0000000 0000000 trailing-dot = 1.
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/trailing-exp-dot.toml 0000664 0000000 0000000 00000000030 15130702260 0032710 0 ustar 00root root 0000000 0000000 trailing-exp-dot = 0.e
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/trailing-exp-minus.toml 0000664 0000000 0000000 00000000033 15130702260 0033260 0 ustar 00root root 0000000 0000000 trailing-exp-minus = 0.0e-
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/trailing-exp-plus.toml 0000664 0000000 0000000 00000000032 15130702260 0033107 0 ustar 00root root 0000000 0000000 trailing-exp-plus = 0.0e+
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/trailing-exp.toml 0000664 0000000 0000000 00000000024 15130702260 0032127 0 ustar 00root root 0000000 0000000 trailing-exp = 0.0E
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/trailing-us-exp-01.toml 0000664 0000000 0000000 00000000031 15130702260 0032770 0 ustar 00root root 0000000 0000000 trailing-us-exp-1 = 1_e2
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/trailing-us-exp-02.toml 0000664 0000000 0000000 00000000033 15130702260 0032773 0 ustar 00root root 0000000 0000000 trailing-us-exp-2 = 1.2_e2
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/trailing-us.toml 0000664 0000000 0000000 00000000023 15130702260 0031761 0 ustar 00root root 0000000 0000000 trailing-us = 1.2_
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/us-after-dot.toml 0000664 0000000 0000000 00000000024 15130702260 0032036 0 ustar 00root root 0000000 0000000 us-after-dot = 1._2
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/float/us-before-dot.toml 0000664 0000000 0000000 00000000025 15130702260 0032200 0 ustar 00root root 0000000 0000000 us-before-dot = 1_.2
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/inline-table/ 0000775 0000000 0000000 00000000000 15130702260 0030071 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/inline-table/bad-key-syntax.toml0000664 0000000 0000000 00000000025 15130702260 0033623 0 ustar 00root root 0000000 0000000 tbl = { a = 1, [b] }
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/inline-table/double-comma.toml 0000664 0000000 0000000 00000000017 15130702260 0033330 0 ustar 00root root 0000000 0000000 t = {x=3,,y=4}
duplicate-key-01.toml 0000664 0000000 0000000 00000000101 15130702260 0033655 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/inline-table # Duplicate keys within an inline table are invalid
a={b=1, b=2}
duplicate-key-02.toml 0000664 0000000 0000000 00000000056 15130702260 0033667 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/inline-table table1 = { table2.dupe = 1, table2.dupe = 2 }
duplicate-key-03.toml 0000664 0000000 0000000 00000000124 15130702260 0033664 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/inline-table tbl = { fruit = { apple.color = "red" }, fruit.apple.texture = { smooth = true } }
duplicate-key-04.toml 0000664 0000000 0000000 00000000047 15130702260 0033671 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/inline-table tbl = { a.b = "a_b", a.b.c = "a_b_c" }
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/inline-table/empty-01.toml 0000664 0000000 0000000 00000000010 15130702260 0032331 0 ustar 00root root 0000000 0000000 t = {,}
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/inline-table/empty-02.toml 0000664 0000000 0000000 00000000011 15130702260 0032333 0 ustar 00root root 0000000 0000000 t = {,
}
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/inline-table/empty-03.toml 0000664 0000000 0000000 00000000012 15130702260 0032335 0 ustar 00root root 0000000 0000000 t = {
,
}
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/inline-table/no-close-01.toml 0000664 0000000 0000000 00000000004 15130702260 0032715 0 ustar 00root root 0000000 0000000 a={
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/inline-table/no-close-02.toml 0000664 0000000 0000000 00000000007 15130702260 0032721 0 ustar 00root root 0000000 0000000 a={b=1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/inline-table/no-comma-01.toml 0000664 0000000 0000000 00000000022 15130702260 0032704 0 ustar 00root root 0000000 0000000 t = {x = 3 y = 4}
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/inline-table/no-comma-02.toml 0000664 0000000 0000000 00000000063 15130702260 0032712 0 ustar 00root root 0000000 0000000 arrr = { comma-missing = true valid-toml = false }
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/inline-table/overwrite-01.toml 0000664 0000000 0000000 00000000132 15130702260 0033226 0 ustar 00root root 0000000 0000000 a.b=0
# Since table "a" is already defined, it can't be replaced by an inline table.
a={}
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/inline-table/overwrite-02.toml 0000664 0000000 0000000 00000000077 15130702260 0033237 0 ustar 00root root 0000000 0000000 a={}
# Inline tables are immutable and can't be extended
[a.b]
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/inline-table/overwrite-03.toml 0000664 0000000 0000000 00000000026 15130702260 0033232 0 ustar 00root root 0000000 0000000 a = { b = 1 }
a.b = 2
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/inline-table/overwrite-04.toml 0000664 0000000 0000000 00000000054 15130702260 0033234 0 ustar 00root root 0000000 0000000 inline-t = { nest = {} }
[[inline-t.nest]]
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/inline-table/overwrite-05.toml 0000664 0000000 0000000 00000000052 15130702260 0033233 0 ustar 00root root 0000000 0000000 inline-t = { nest = {} }
[inline-t.nest]
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/inline-table/overwrite-06.toml 0000664 0000000 0000000 00000000027 15130702260 0033236 0 ustar 00root root 0000000 0000000 a = { b = 1, b.c = 2 }
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/inline-table/overwrite-07.toml 0000664 0000000 0000000 00000000065 15130702260 0033241 0 ustar 00root root 0000000 0000000 tab = { inner.table = [{}], inner.table.val = "bad" } hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/inline-table/overwrite-08.toml 0000664 0000000 0000000 00000000067 15130702260 0033244 0 ustar 00root root 0000000 0000000 tab = { inner = { dog = "best" }, inner.cat = "worst" } hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/inline-table/overwrite-09.toml 0000664 0000000 0000000 00000000106 15130702260 0033237 0 ustar 00root root 0000000 0000000 [tab.nested]
inline-t = { nest = {} }
[tab]
nested.inline-t.nest = 2
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/inline-table/overwrite-10.toml 0000664 0000000 0000000 00000000252 15130702260 0033231 0 ustar 00root root 0000000 0000000 # Set implicit "b", overwrite "b" (illegal!) and then set another implicit.
#
# Caused panic: https://github.com/BurntSushi/toml/issues/403
a = {b.a = 1, b = 2, b.c = 3}
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/integer/ 0000775 0000000 0000000 00000000000 15130702260 0027163 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/integer/capital-bin.toml 0000664 0000000 0000000 00000000022 15130702260 0032235 0 ustar 00root root 0000000 0000000 capital-bin = 0B0
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/integer/capital-hex.toml 0000664 0000000 0000000 00000000022 15130702260 0032251 0 ustar 00root root 0000000 0000000 capital-hex = 0X1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/integer/capital-oct.toml 0000664 0000000 0000000 00000000022 15130702260 0032252 0 ustar 00root root 0000000 0000000 capital-oct = 0O0
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/integer/double-sign-nex.toml 0000664 0000000 0000000 00000000027 15130702260 0033057 0 ustar 00root root 0000000 0000000 double-sign-nex = --99
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/integer/double-sign-plus.toml 0000664 0000000 0000000 00000000030 15130702260 0033242 0 ustar 00root root 0000000 0000000 double-sign-plus = ++99
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/integer/double-us.toml 0000664 0000000 0000000 00000000022 15130702260 0031751 0 ustar 00root root 0000000 0000000 double-us = 1__23
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/integer/incomplete-bin.toml 0000664 0000000 0000000 00000000024 15130702260 0032761 0 ustar 00root root 0000000 0000000 incomplete-bin = 0b
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/integer/incomplete-hex.toml 0000664 0000000 0000000 00000000024 15130702260 0032775 0 ustar 00root root 0000000 0000000 incomplete-hex = 0x
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/integer/incomplete-oct.toml 0000664 0000000 0000000 00000000024 15130702260 0032776 0 ustar 00root root 0000000 0000000 incomplete-oct = 0o
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/integer/invalid-bin.toml 0000664 0000000 0000000 00000000025 15130702260 0032251 0 ustar 00root root 0000000 0000000 invalid-bin = 0b0012
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/integer/invalid-hex-01.toml 0000664 0000000 0000000 00000000030 15130702260 0032477 0 ustar 00root root 0000000 0000000 invalid-hex-01 = 0xaafz
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/integer/invalid-hex-02.toml 0000664 0000000 0000000 00000000035 15130702260 0032505 0 ustar 00root root 0000000 0000000 invalid-hex-02 = 0xgabba00f1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/integer/invalid-hex-03.toml 0000664 0000000 0000000 00000000011 15130702260 0032500 0 ustar 00root root 0000000 0000000 a = 0x-1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/integer/invalid-oct.toml 0000664 0000000 0000000 00000000024 15130702260 0032265 0 ustar 00root root 0000000 0000000 invalid-oct = 0o778
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/integer/leading-us-bin.toml 0000664 0000000 0000000 00000000026 15130702260 0032654 0 ustar 00root root 0000000 0000000 leading-us-bin = _0b1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/integer/leading-us-hex.toml 0000664 0000000 0000000 00000000026 15130702260 0032670 0 ustar 00root root 0000000 0000000 leading-us-hex = _0x1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/integer/leading-us-oct.toml 0000664 0000000 0000000 00000000026 15130702260 0032671 0 ustar 00root root 0000000 0000000 leading-us-oct = _0o1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/integer/leading-us.toml 0000664 0000000 0000000 00000000022 15130702260 0032102 0 ustar 00root root 0000000 0000000 leading-us = _123
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/integer/leading-zero-01.toml 0000664 0000000 0000000 00000000025 15130702260 0032653 0 ustar 00root root 0000000 0000000 leading-zero-01 = 01
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/integer/leading-zero-02.toml 0000664 0000000 0000000 00000000025 15130702260 0032654 0 ustar 00root root 0000000 0000000 leading-zero-02 = 00
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/integer/leading-zero-03.toml 0000664 0000000 0000000 00000000026 15130702260 0032656 0 ustar 00root root 0000000 0000000 leading-zero-03 = 0_0
leading-zero-sign-01.toml 0000664 0000000 0000000 00000000033 15130702260 0033531 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/integer leading-zero-sign-01 = -01
leading-zero-sign-02.toml 0000664 0000000 0000000 00000000033 15130702260 0033532 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/integer leading-zero-sign-02 = +01
leading-zero-sign-03.toml 0000664 0000000 0000000 00000000034 15130702260 0033534 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/integer leading-zero-sign-03 = +0_1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/integer/negative-bin.toml 0000664 0000000 0000000 00000000033 15130702260 0032424 0 ustar 00root root 0000000 0000000 negative-bin = -0b11010110
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/integer/negative-hex.toml 0000664 0000000 0000000 00000000025 15130702260 0032441 0 ustar 00root root 0000000 0000000 negative-hex = -0xff
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/integer/negative-oct.toml 0000664 0000000 0000000 00000000026 15130702260 0032443 0 ustar 00root root 0000000 0000000 negative-oct = -0o755
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/integer/positive-bin.toml 0000664 0000000 0000000 00000000033 15130702260 0032464 0 ustar 00root root 0000000 0000000 positive-bin = +0b11010110
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/integer/positive-hex.toml 0000664 0000000 0000000 00000000025 15130702260 0032501 0 ustar 00root root 0000000 0000000 positive-hex = +0xff
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/integer/positive-oct.toml 0000664 0000000 0000000 00000000026 15130702260 0032503 0 ustar 00root root 0000000 0000000 positive-oct = +0o755
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/integer/text-after-integer.toml 0000664 0000000 0000000 00000000041 15130702260 0033571 0 ustar 00root root 0000000 0000000 answer = 42 the ultimate answer?
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/integer/trailing-us-bin.toml 0000664 0000000 0000000 00000000027 15130702260 0033063 0 ustar 00root root 0000000 0000000 trailing-us-bin = 0b1_
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/integer/trailing-us-hex.toml 0000664 0000000 0000000 00000000027 15130702260 0033077 0 ustar 00root root 0000000 0000000 trailing-us-hex = 0x1_
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/integer/trailing-us-oct.toml 0000664 0000000 0000000 00000000027 15130702260 0033100 0 ustar 00root root 0000000 0000000 trailing-us-oct = 0o1_
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/integer/trailing-us.toml 0000664 0000000 0000000 00000000023 15130702260 0032311 0 ustar 00root root 0000000 0000000 trailing-us = 123_
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/integer/us-after-bin.toml 0000664 0000000 0000000 00000000024 15130702260 0032350 0 ustar 00root root 0000000 0000000 us-after-bin = 0b_1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/integer/us-after-hex.toml 0000664 0000000 0000000 00000000024 15130702260 0032364 0 ustar 00root root 0000000 0000000 us-after-hex = 0x_1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/integer/us-after-oct.toml 0000664 0000000 0000000 00000000024 15130702260 0032365 0 ustar 00root root 0000000 0000000 us-after-oct = 0o_1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/ 0000775 0000000 0000000 00000000000 15130702260 0026316 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/after-array.toml 0000664 0000000 0000000 00000000040 15130702260 0031422 0 ustar 00root root 0000000 0000000 [[agencies]] owner = "S Cjelli"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/after-table.toml 0000664 0000000 0000000 00000000044 15130702260 0031377 0 ustar 00root root 0000000 0000000 [error] this = "should not be here"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/after-value.toml 0000664 0000000 0000000 00000000060 15130702260 0031422 0 ustar 00root root 0000000 0000000 first = "Tom" last = "Preston-Werner" # INVALID
bare-invalid-character-01.toml 0000664 0000000 0000000 00000000010 15130702260 0033630 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key ! = 123
bare-invalid-character-02.toml 0000664 0000000 0000000 00000000017 15130702260 0033640 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key bare!key = 123
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/dot.toml 0000664 0000000 0000000 00000000006 15130702260 0027775 0 ustar 00root root 0000000 0000000 . = 1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/dotdot.toml 0000664 0000000 0000000 00000000007 15130702260 0030505 0 ustar 00root root 0000000 0000000 .. = 1
dotted-redefine-table-01.toml 0000664 0000000 0000000 00000000025 15130702260 0033476 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key a = false
a.b = true
dotted-redefine-table-02.toml 0000664 0000000 0000000 00000000114 15130702260 0033476 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key # Defined a.b as int
a.b = 1
# Tries to access it as table: error
a.b.c = 2
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/duplicate-keys-01.toml 0000664 0000000 0000000 00000000036 15130702260 0032353 0 ustar 00root root 0000000 0000000 name = "Tom"
name = "Pradyun"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/duplicate-keys-02.toml 0000664 0000000 0000000 00000000031 15130702260 0032347 0 ustar 00root root 0000000 0000000 dupe = false
dupe = true
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/duplicate-keys-03.toml 0000664 0000000 0000000 00000000061 15130702260 0032353 0 ustar 00root root 0000000 0000000 spelling = "favorite"
"spelling" = "favourite"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/duplicate-keys-04.toml 0000664 0000000 0000000 00000000061 15130702260 0032354 0 ustar 00root root 0000000 0000000 spelling = "favorite"
'spelling' = "favourite"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/duplicate-keys-05.toml 0000664 0000000 0000000 00000000032 15130702260 0032353 0 ustar 00root root 0000000 0000000 a = 1
"\u0061" = 1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/duplicate-keys-06.toml 0000664 0000000 0000000 00000000036 15130702260 0032360 0 ustar 00root root 0000000 0000000 "a'b" = 1
"a\u0027b" = 2
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/duplicate-keys-07.toml 0000664 0000000 0000000 00000000016 15130702260 0032357 0 ustar 00root root 0000000 0000000 "" = 1
"" = 2
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/duplicate-keys-08.toml 0000664 0000000 0000000 00000000024 15130702260 0032357 0 ustar 00root root 0000000 0000000 arr = [1]
arr = [2]
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/duplicate-keys-09.toml 0000664 0000000 0000000 00000000031 15130702260 0032356 0 ustar 00root root 0000000 0000000 tbl = {k=1}
tbl = {kk=2}
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/empty.toml 0000664 0000000 0000000 00000000005 15130702260 0030344 0 ustar 00root root 0000000 0000000 = 1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/end-in-escape.toml 0000664 0000000 0000000 00000000035 15130702260 0031621 0 ustar 00root root 0000000 0000000 "backslash is the last char\
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/escape.toml 0000664 0000000 0000000 00000000055 15130702260 0030453 0 ustar 00root root 0000000 0000000 \u00c0 = "latin capital letter A with grave"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/hash.toml 0000664 0000000 0000000 00000000007 15130702260 0030133 0 ustar 00root root 0000000 0000000 a# = 1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/multiline-key-01.toml 0000664 0000000 0000000 00000000016 15130702260 0032216 0 ustar 00root root 0000000 0000000 """key""" = 1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/multiline-key-02.toml 0000664 0000000 0000000 00000000016 15130702260 0032217 0 ustar 00root root 0000000 0000000 '''key''' = 1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/multiline-key-03.toml 0000664 0000000 0000000 00000000024 15130702260 0032217 0 ustar 00root root 0000000 0000000 """key""" = """v"""
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/multiline-key-04.toml 0000664 0000000 0000000 00000000024 15130702260 0032220 0 ustar 00root root 0000000 0000000 '''key''' = '''v'''
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/newline-01.toml 0000664 0000000 0000000 00000000017 15130702260 0031070 0 ustar 00root root 0000000 0000000 barekey
= 1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/newline-02.toml 0000664 0000000 0000000 00000000021 15130702260 0031064 0 ustar 00root root 0000000 0000000 "quoted
key" = 1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/newline-03.toml 0000664 0000000 0000000 00000000021 15130702260 0031065 0 ustar 00root root 0000000 0000000 'quoted
key' = 1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/newline-04.toml 0000664 0000000 0000000 00000000023 15130702260 0031070 0 ustar 00root root 0000000 0000000 """long
key""" = 1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/newline-05.toml 0000664 0000000 0000000 00000000023 15130702260 0031071 0 ustar 00root root 0000000 0000000 '''long
key''' = 1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/newline-06.toml 0000664 0000000 0000000 00000000010 15130702260 0031066 0 ustar 00root root 0000000 0000000 key =
1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/no-eol-01.toml 0000664 0000000 0000000 00000000014 15130702260 0030615 0 ustar 00root root 0000000 0000000 a = 1 b = 2
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/no-eol-02.toml 0000664 0000000 0000000 00000000013 15130702260 0030615 0 ustar 00root root 0000000 0000000 0=0r=false
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/no-eol-03.toml 0000664 0000000 0000000 00000000051 15130702260 0030620 0 ustar 00root root 0000000 0000000 0=""o=""m=""r=""00="0"q="""0"""e="""0"""
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/no-eol-04.toml 0000664 0000000 0000000 00000000066 15130702260 0030627 0 ustar 00root root 0000000 0000000 [[0000l0]]
0="0"[[0000l0]]
0="0"[[0000l0]]
0="0"l="0"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/no-eol-05.toml 0000664 0000000 0000000 00000000114 15130702260 0030622 0 ustar 00root root 0000000 0000000 0=[0]00=[0,0,0]t=["0","0","0"]s=[1000-00-00T00:00:00Z,2000-00-00T00:00:00Z]
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/no-eol-06.toml 0000664 0000000 0000000 00000000017 15130702260 0030625 0 ustar 00root root 0000000 0000000 0=0r0=0r=false
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/no-eol-07.toml 0000664 0000000 0000000 00000000030 15130702260 0030621 0 ustar 00root root 0000000 0000000 0=0r0=0r=falsefal=false
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/only-float.toml 0000664 0000000 0000000 00000000004 15130702260 0031271 0 ustar 00root root 0000000 0000000 1.1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/only-int.toml 0000664 0000000 0000000 00000000002 15130702260 0030754 0 ustar 00root root 0000000 0000000 1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/only-str.toml 0000664 0000000 0000000 00000000003 15130702260 0030773 0 ustar 00root root 0000000 0000000 ""
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/open-bracket.toml 0000664 0000000 0000000 00000000011 15130702260 0031555 0 ustar 00root root 0000000 0000000 [abc = 1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/partial-quoted.toml 0000664 0000000 0000000 00000000024 15130702260 0032142 0 ustar 00root root 0000000 0000000 partial"quoted" = 5
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/quoted-unclosed-01.toml 0000664 0000000 0000000 00000000011 15130702260 0032534 0 ustar 00root root 0000000 0000000 "key = x
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/quoted-unclosed-02.toml 0000664 0000000 0000000 00000000005 15130702260 0032540 0 ustar 00root root 0000000 0000000 "key
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/single-open-bracket.toml 0000664 0000000 0000000 00000000002 15130702260 0033034 0 ustar 00root root 0000000 0000000 [
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/space.toml 0000664 0000000 0000000 00000000010 15130702260 0030275 0 ustar 00root root 0000000 0000000 a b = 1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/special-character.toml 0000664 0000000 0000000 00000000035 15130702260 0032563 0 ustar 00root root 0000000 0000000 μ = "greek small letter mu"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/start-bracket.toml 0000664 0000000 0000000 00000000021 15130702260 0031752 0 ustar 00root root 0000000 0000000 [a]
[xyz = 5
[b]
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/start-dot.toml 0000664 0000000 0000000 00000000011 15130702260 0031124 0 ustar 00root root 0000000 0000000 .key = 1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/two-equals-01.toml 0000664 0000000 0000000 00000000011 15130702260 0031522 0 ustar 00root root 0000000 0000000 key= = 1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/two-equals-02.toml 0000664 0000000 0000000 00000000005 15130702260 0031526 0 ustar 00root root 0000000 0000000 a==1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/two-equals-03.toml 0000664 0000000 0000000 00000000006 15130702260 0031530 0 ustar 00root root 0000000 0000000 a=b=1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/without-value-01.toml 0000664 0000000 0000000 00000000004 15130702260 0032240 0 ustar 00root root 0000000 0000000 key
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/without-value-02.toml 0000664 0000000 0000000 00000000007 15130702260 0032244 0 ustar 00root root 0000000 0000000 key =
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/without-value-03.toml 0000664 0000000 0000000 00000000006 15130702260 0032244 0 ustar 00root root 0000000 0000000 "key"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/without-value-04.toml 0000664 0000000 0000000 00000000011 15130702260 0032241 0 ustar 00root root 0000000 0000000 "key" =
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/without-value-05.toml 0000664 0000000 0000000 00000000006 15130702260 0032246 0 ustar 00root root 0000000 0000000 fs.fw
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/without-value-06.toml 0000664 0000000 0000000 00000000010 15130702260 0032242 0 ustar 00root root 0000000 0000000 fs.fw =
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/key/without-value-07.toml 0000664 0000000 0000000 00000000004 15130702260 0032246 0 ustar 00root root 0000000 0000000 fs.
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/local-date/ 0000775 0000000 0000000 00000000000 15130702260 0027533 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/local-date/day-1digit.toml 0000664 0000000 0000000 00000000020 15130702260 0032354 0 ustar 00root root 0000000 0000000 foo = 1997-09-9
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/local-date/feb-29.toml 0000664 0000000 0000000 00000000037 15130702260 0031414 0 ustar 00root root 0000000 0000000 "not a leap year" = 2100-02-29
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/local-date/feb-30.toml 0000664 0000000 0000000 00000000057 15130702260 0031406 0 ustar 00root root 0000000 0000000 "only 28 or 29 days in february" = 1988-02-30
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/local-date/mday-over.toml 0000664 0000000 0000000 00000000172 15130702260 0032333 0 ustar 00root root 0000000 0000000 # date-mday = 2DIGIT ; 01-28, 01-29, 01-30, 01-31 based on
# ; month/year
d = 2006-01-32
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/local-date/mday-under.toml 0000664 0000000 0000000 00000000172 15130702260 0032475 0 ustar 00root root 0000000 0000000 # date-mday = 2DIGIT ; 01-28, 01-29, 01-30, 01-31 based on
# ; month/year
d = 2006-01-00
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/local-date/month-over.toml 0000664 0000000 0000000 00000000063 15130702260 0032525 0 ustar 00root root 0000000 0000000 # date-month = 2DIGIT ; 01-12
d = 2006-13-01
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/local-date/month-under.toml 0000664 0000000 0000000 00000000063 15130702260 0032667 0 ustar 00root root 0000000 0000000 # date-month = 2DIGIT ; 01-12
d = 2007-00-01
no-leads-with-milli.toml 0000664 0000000 0000000 00000000120 15130702260 0034121 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/local-date # Day "5" instead of "05"; the leading zero is required.
with-milli = 1987-07-5
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/local-date/no-leads.toml 0000664 0000000 0000000 00000000120 15130702260 0032123 0 ustar 00root root 0000000 0000000 # Month "7" instead of "07"; the leading zero is required.
no-leads = 1987-7-05
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/local-date/trailing-t.toml 0000664 0000000 0000000 00000000062 15130702260 0032500 0 ustar 00root root 0000000 0000000 # Date cannot end with trailing T
d = 2006-01-30T
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/local-date/y10k.toml 0000664 0000000 0000000 00000000060 15130702260 0031210 0 ustar 00root root 0000000 0000000 # Maximum RFC3399 year is 9999.
d = 10000-01-01
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/local-date/year-3digits.toml 0000664 0000000 0000000 00000000020 15130702260 0032724 0 ustar 00root root 0000000 0000000 foo = 199-09-09
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/local-datetime/ 0000775 0000000 0000000 00000000000 15130702260 0030412 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/local-datetime/feb-29.toml 0000664 0000000 0000000 00000000050 15130702260 0032266 0 ustar 00root root 0000000 0000000 "not a leap year" = 2100-02-29T15:15:15
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/local-datetime/feb-30.toml 0000664 0000000 0000000 00000000070 15130702260 0032260 0 ustar 00root root 0000000 0000000 "only 28 or 29 days in february" = 1988-02-30T15:15:15
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/local-datetime/hour-over.toml 0000664 0000000 0000000 00000000074 15130702260 0033236 0 ustar 00root root 0000000 0000000 # time-hour = 2DIGIT ; 00-23
d = 2006-01-01T24:00:00
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/local-datetime/mday-over.toml 0000664 0000000 0000000 00000000203 15130702260 0033205 0 ustar 00root root 0000000 0000000 # date-mday = 2DIGIT ; 01-28, 01-29, 01-30, 01-31 based on
# ; month/year
d = 2006-01-32T00:00:00
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/local-datetime/mday-under.toml 0000664 0000000 0000000 00000000203 15130702260 0033347 0 ustar 00root root 0000000 0000000 # date-mday = 2DIGIT ; 01-28, 01-29, 01-30, 01-31 based on
# ; month/year
d = 2006-01-00T00:00:00
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/local-datetime/minute-over.toml 0000664 0000000 0000000 00000000074 15130702260 0033562 0 ustar 00root root 0000000 0000000 # time-minute = 2DIGIT ; 00-59
d = 2006-01-01T00:60:00
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/local-datetime/month-over.toml 0000664 0000000 0000000 00000000074 15130702260 0033406 0 ustar 00root root 0000000 0000000 # date-month = 2DIGIT ; 01-12
d = 2006-13-01T00:00:00
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/local-datetime/month-under.toml 0000664 0000000 0000000 00000000074 15130702260 0033550 0 ustar 00root root 0000000 0000000 # date-month = 2DIGIT ; 01-12
d = 2007-00-01T00:00:00
no-leads-with-milli.toml 0000664 0000000 0000000 00000000134 15130702260 0035005 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/local-datetime # Day "5" instead of "05"; the leading zero is required.
with-milli = 1987-07-5T17:45:00.12
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/local-datetime/no-leads.toml 0000664 0000000 0000000 00000000131 15130702260 0033004 0 ustar 00root root 0000000 0000000 # Month "7" instead of "07"; the leading zero is required.
no-leads = 1987-7-05T17:45:00
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/local-datetime/no-t.toml 0000664 0000000 0000000 00000000105 15130702260 0032160 0 ustar 00root root 0000000 0000000 # No "t" or "T" between the date and time.
no-t = 1987-07-0517:45:00
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/local-datetime/second-over.toml 0000664 0000000 0000000 00000000203 15130702260 0033526 0 ustar 00root root 0000000 0000000 # time-second = 2DIGIT ; 00-58, 00-59, 00-60 based on leap second
# ; rules
d = 2006-01-01T00:00:61
time-no-leads.toml 0000664 0000000 0000000 00000000070 15130702260 0033663 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/local-datetime # Leading 0 is always required.
d = 2023-10-01T1:32:00Z
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/local-datetime/y10k.toml 0000664 0000000 0000000 00000000071 15130702260 0032071 0 ustar 00root root 0000000 0000000 # Maximum RFC3399 year is 9999.
d = 10000-01-01 00:00:00
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/local-time/ 0000775 0000000 0000000 00000000000 15130702260 0027554 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/local-time/hour-over.toml 0000664 0000000 0000000 00000000061 15130702260 0032374 0 ustar 00root root 0000000 0000000 # time-hour = 2DIGIT ; 00-23
d = 24:00:00
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/local-time/minute-over.toml 0000664 0000000 0000000 00000000061 15130702260 0032720 0 ustar 00root root 0000000 0000000 # time-minute = 2DIGIT ; 00-59
d = 00:60:00
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/local-time/second-over.toml 0000664 0000000 0000000 00000000170 15130702260 0032673 0 ustar 00root root 0000000 0000000 # time-second = 2DIGIT ; 00-58, 00-59, 00-60 based on leap second
# ; rules
d = 00:00:61
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/local-time/time-no-leads-01.toml0000664 0000000 0000000 00000000054 15130702260 0033324 0 ustar 00root root 0000000 0000000 # Leading 0 is always required.
d = 1:32:00
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/local-time/time-no-leads-02.toml0000664 0000000 0000000 00000000054 15130702260 0033325 0 ustar 00root root 0000000 0000000 # Leading 0 is always required.
d = 01:32:0
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/local-time/trailing-dot.toml 0000664 0000000 0000000 00000000016 15130702260 0033043 0 ustar 00root root 0000000 0000000 t = 12:13:14.
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/local-time/trailing-dotdot.toml 0000664 0000000 0000000 00000000017 15130702260 0033553 0 ustar 00root root 0000000 0000000 t = 12:13:14..
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/spec-1.1.0/ 0000775 0000000 0000000 00000000000 15130702260 0027113 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/spec-1.1.0/common-16-0.toml 0000664 0000000 0000000 00000000551 15130702260 0031662 0 ustar 00root root 0000000 0000000 str4 = """Here are two quotation marks: "". Simple enough."""
str5 = """Here are three quotation marks: """.""" # INVALID
str5 = """Here are three quotation marks: ""\"."""
str6 = """Here are fifteen quotation marks: ""\"""\"""\"""\"""\"."""
# "This," she said, "is just a pointless statement."
str7 = """"This," she said, "is just a pointless statement.""""
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/spec-1.1.0/common-19-0.toml 0000664 0000000 0000000 00000000442 15130702260 0031664 0 ustar 00root root 0000000 0000000 quot15 = '''Here are fifteen quotation marks: """""""""""""""'''
apos15 = '''Here are fifteen apostrophes: '''''''''''''''''' # INVALID
apos15 = "Here are fifteen apostrophes: '''''''''''''''"
# 'That,' she said, 'is still pointless.'
str = ''''That,' she said, 'is still pointless.''''
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/spec-1.1.0/common-2.toml 0000664 0000000 0000000 00000000020 15130702260 0031427 0 ustar 00root root 0000000 0000000 key = # INVALID
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/spec-1.1.0/common-46-0.toml 0000664 0000000 0000000 00000000257 15130702260 0031670 0 ustar 00root root 0000000 0000000 [fruit]
apple.color = "red"
apple.taste.sweet = true
[fruit.apple] # INVALID
# [fruit.apple.taste] # INVALID
[fruit.apple.texture] # you can add sub-tables
smooth = true
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/spec-1.1.0/common-46-1.toml 0000664 0000000 0000000 00000000257 15130702260 0031671 0 ustar 00root root 0000000 0000000 [fruit]
apple.color = "red"
apple.taste.sweet = true
# [fruit.apple] # INVALID
[fruit.apple.taste] # INVALID
[fruit.apple.texture] # you can add sub-tables
smooth = true
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/spec-1.1.0/common-49-0.toml 0000664 0000000 0000000 00000000102 15130702260 0031660 0 ustar 00root root 0000000 0000000 [product]
type = { name = "Nail" }
type.edible = false # INVALID
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/spec-1.1.0/common-5.toml 0000664 0000000 0000000 00000000254 15130702260 0031443 0 ustar 00root root 0000000 0000000 = "no key name" # INVALID
"""key""" = "not allowed" # INVALID
"" = "blank" # VALID but discouraged
'' = 'blank' # VALID but discouraged
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/spec-1.1.0/common-50-0.toml 0000664 0000000 0000000 00000000102 15130702260 0031650 0 ustar 00root root 0000000 0000000 [product]
type.name = "Nail"
type = { edible = false } # INVALID
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/ 0000775 0000000 0000000 00000000000 15130702260 0027034 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/bad-byte-escape.toml 0000664 0000000 0000000 00000000021 15130702260 0032647 0 ustar 00root root 0000000 0000000 naughty = "\xAg"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/bad-concat.toml 0000664 0000000 0000000 00000000035 15130702260 0031722 0 ustar 00root root 0000000 0000000 no_concat = "first" "second"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/bad-escape-01.toml 0000664 0000000 0000000 00000000076 15130702260 0032136 0 ustar 00root root 0000000 0000000 invalid-escape = "This string has a bad \a escape character."
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/bad-escape-02.toml 0000664 0000000 0000000 00000000077 15130702260 0032140 0 ustar 00root root 0000000 0000000 invalid-escape = "This string has a bad \ escape character."
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/bad-escape-03.toml 0000664 0000000 0000000 00000000020 15130702260 0032125 0 ustar 00root root 0000000 0000000 backslash = "\"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/bad-escape-04.toml 0000664 0000000 0000000 00000000016 15130702260 0032133 0 ustar 00root root 0000000 0000000 a = "a \\\ b"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/bad-escape-05.toml 0000664 0000000 0000000 00000000020 15130702260 0032127 0 ustar 00root root 0000000 0000000 a = "a \\\\\ b"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/bad-hex-esc-01.toml 0000664 0000000 0000000 00000000030 15130702260 0032220 0 ustar 00root root 0000000 0000000 bad-hex-esc-01 = "\x0g"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/bad-hex-esc-02.toml 0000664 0000000 0000000 00000000030 15130702260 0032221 0 ustar 00root root 0000000 0000000 bad-hex-esc-02 = "\xG0"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/bad-hex-esc-03.toml 0000664 0000000 0000000 00000000026 15130702260 0032227 0 ustar 00root root 0000000 0000000 bad-hex-esc-03 = "\x"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/bad-hex-esc-04.toml 0000664 0000000 0000000 00000000031 15130702260 0032224 0 ustar 00root root 0000000 0000000 bad-hex-esc-04 = "\x 50"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/bad-hex-esc-05.toml 0000664 0000000 0000000 00000000030 15130702260 0032224 0 ustar 00root root 0000000 0000000 bad-hex-esc-5 = "\x 50"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/bad-multiline.toml 0000664 0000000 0000000 00000000041 15130702260 0032452 0 ustar 00root root 0000000 0000000 multi = "first line
second line"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/bad-slash-escape.toml 0000664 0000000 0000000 00000000076 15130702260 0033030 0 ustar 00root root 0000000 0000000 invalid-escape = "This string has a bad \/ escape character."
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/bad-uni-esc-01.toml 0000664 0000000 0000000 00000000032 15130702260 0032231 0 ustar 00root root 0000000 0000000 bad-uni-esc-01 = "val\ue"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/bad-uni-esc-02.toml 0000664 0000000 0000000 00000000032 15130702260 0032232 0 ustar 00root root 0000000 0000000 bad-uni-esc-02 = "val\Ux"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/bad-uni-esc-03.toml 0000664 0000000 0000000 00000000040 15130702260 0032232 0 ustar 00root root 0000000 0000000 bad-uni-esc-03 = "val\U0000000"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/bad-uni-esc-04.toml 0000664 0000000 0000000 00000000035 15130702260 0032237 0 ustar 00root root 0000000 0000000 bad-uni-esc-04 = "val\U0000"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/bad-uni-esc-05.toml 0000664 0000000 0000000 00000000041 15130702260 0032235 0 ustar 00root root 0000000 0000000 bad-uni-esc-05 = "val\Ugggggggg"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/bad-uni-esc-06.toml 0000664 0000000 0000000 00000000116 15130702260 0032241 0 ustar 00root root 0000000 0000000 bad-uni-esc-06 = "This string contains a non scalar unicode codepoint \uD801"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/bad-uni-esc-07.toml 0000664 0000000 0000000 00000000032 15130702260 0032237 0 ustar 00root root 0000000 0000000 bad-uni-esc-07 = "\uabag"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/bad-uni-esc-ml-01.toml 0000664 0000000 0000000 00000000041 15130702260 0032637 0 ustar 00root root 0000000 0000000 bad-uni-esc-ml-01 = """val\ue"""
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/bad-uni-esc-ml-02.toml 0000664 0000000 0000000 00000000041 15130702260 0032640 0 ustar 00root root 0000000 0000000 bad-uni-esc-ml-02 = """val\Ux"""
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/bad-uni-esc-ml-03.toml 0000664 0000000 0000000 00000000047 15130702260 0032647 0 ustar 00root root 0000000 0000000 bad-uni-esc-ml-03 = """val\U0000000"""
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/bad-uni-esc-ml-04.toml 0000664 0000000 0000000 00000000044 15130702260 0032645 0 ustar 00root root 0000000 0000000 bad-uni-esc-ml-04 = """val\U0000"""
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/bad-uni-esc-ml-05.toml 0000664 0000000 0000000 00000000050 15130702260 0032643 0 ustar 00root root 0000000 0000000 bad-uni-esc-ml-05 = """val\Ugggggggg"""
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/bad-uni-esc-ml-06.toml 0000664 0000000 0000000 00000000125 15130702260 0032647 0 ustar 00root root 0000000 0000000 bad-uni-esc-ml-06 = """This string contains a non scalar unicode codepoint \uD801"""
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/bad-uni-esc-ml-07.toml 0000664 0000000 0000000 00000000041 15130702260 0032645 0 ustar 00root root 0000000 0000000 bad-uni-esc-ml-07 = """\uabag"""
basic-multiline-out-of-range-unicode-escape-01.toml 0000664 0000000 0000000 00000000025 15130702260 0040331 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string a = """\UFFFFFFFF"""
basic-multiline-out-of-range-unicode-escape-02.toml 0000664 0000000 0000000 00000000025 15130702260 0040332 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string a = """\U00D80000"""
basic-multiline-quotes.toml 0000664 0000000 0000000 00000000062 15130702260 0034247 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string str5 = """Here are three quotation marks: """."""
basic-multiline-unknown-escape.toml 0000664 0000000 0000000 00000000015 15130702260 0035662 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string a = """\@"""
basic-out-of-range-unicode-escape-01.toml 0000664 0000000 0000000 00000000021 15130702260 0036325 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string a = "\UFFFFFFFF"
basic-out-of-range-unicode-escape-02.toml 0000664 0000000 0000000 00000000021 15130702260 0036326 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string a = "\U00D80000"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/basic-unknown-escape.toml0000664 0000000 0000000 00000000011 15130702260 0033735 0 ustar 00root root 0000000 0000000 a = "\@"
literal-multiline-quotes-01.toml 0000664 0000000 0000000 00000000036 15130702260 0035041 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string a = '''6 apostrophes: ''''''
literal-multiline-quotes-02.toml 0000664 0000000 0000000 00000000052 15130702260 0035040 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string a = '''15 apostrophes: ''''''''''''''''''
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/missing-quotes-array.toml0000664 0000000 0000000 00000000017 15130702260 0034032 0 ustar 00root root 0000000 0000000 name = [value]
missing-quotes-inline-table.toml 0000664 0000000 0000000 00000000027 15130702260 0035201 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string name = { key = value }
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/missing-quotes.toml 0000664 0000000 0000000 00000000015 15130702260 0032714 0 ustar 00root root 0000000 0000000 name = value
multiline-bad-escape-01.toml 0000664 0000000 0000000 00000000017 15130702260 0034052 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string k = """t\a"""
multiline-bad-escape-02.toml 0000664 0000000 0000000 00000000061 15130702260 0034052 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string # \ is not a valid escape.
k = """t\ t"""
multiline-bad-escape-03.toml 0000664 0000000 0000000 00000000061 15130702260 0034053 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string # \ is not a valid escape.
k = """t\ """
multiline-bad-escape-04.toml 0000664 0000000 0000000 00000000024 15130702260 0034053 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string backslash = """\"""
multiline-escape-space-01.toml 0000664 0000000 0000000 00000000034 15130702260 0034416 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string a = """
foo \ \n
bar"""
multiline-escape-space-02.toml 0000664 0000000 0000000 00000000035 15130702260 0034420 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string bee = """
hee \
gee \ """
multiline-lit-no-close-01.toml 0000664 0000000 0000000 00000000041 15130702260 0034370 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string invalid = '''
this will fail
multiline-lit-no-close-02.toml 0000664 0000000 0000000 00000000006 15130702260 0034372 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string x='''
multiline-lit-no-close-03.toml 0000664 0000000 0000000 00000000050 15130702260 0034372 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string not-closed= '''
diibaa
blibae ete
eteta
multiline-lit-no-close-04.toml 0000664 0000000 0000000 00000000025 15130702260 0034375 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string bee = '''
hee
gee ''
multiline-no-close-01.toml 0000664 0000000 0000000 00000000041 15130702260 0033602 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string invalid = """
this will fail
multiline-no-close-02.toml 0000664 0000000 0000000 00000000006 15130702260 0033604 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string x="""
multiline-no-close-03.toml 0000664 0000000 0000000 00000000050 15130702260 0033604 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string not-closed= """
diibaa
blibae ete
eteta
multiline-no-close-04.toml 0000664 0000000 0000000 00000000025 15130702260 0033607 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string bee = """
hee
gee ""
multiline-no-close-05.toml 0000664 0000000 0000000 00000000025 15130702260 0033610 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string bee = """
hee
gee\
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/multiline-quotes-01.toml 0000664 0000000 0000000 00000000030 15130702260 0033460 0 ustar 00root root 0000000 0000000 a = """6 quotes: """"""
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/no-close-01.toml 0000664 0000000 0000000 00000000052 15130702260 0031663 0 ustar 00root root 0000000 0000000 no-ending-quote = "One time, at band camp
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/no-close-02.toml 0000664 0000000 0000000 00000000035 15130702260 0031665 0 ustar 00root root 0000000 0000000 "a-string".must-be = "closed
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/no-close-03.toml 0000664 0000000 0000000 00000000052 15130702260 0031665 0 ustar 00root root 0000000 0000000 no-ending-quote = 'One time, at band camp
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/no-close-04.toml 0000664 0000000 0000000 00000000035 15130702260 0031667 0 ustar 00root root 0000000 0000000 'a-string'.must-be = 'closed
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/no-close-05.toml 0000664 0000000 0000000 00000000075 15130702260 0031674 0 ustar 00root root 0000000 0000000 # No newline at end
no-ending-quote = "One time, at band camp hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/no-close-06.toml 0000664 0000000 0000000 00000000060 15130702260 0031667 0 ustar 00root root 0000000 0000000 # No newline at end
"a-string".must-be = "closed hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/no-close-07.toml 0000664 0000000 0000000 00000000075 15130702260 0031676 0 ustar 00root root 0000000 0000000 # No newline at end
no-ending-quote = 'One time, at band camp hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/no-close-08.toml 0000664 0000000 0000000 00000000060 15130702260 0031671 0 ustar 00root root 0000000 0000000 # No newline at end
'a-string'.must-be = 'closed hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/no-close-09.toml 0000664 0000000 0000000 00000000061 15130702260 0031673 0 ustar 00root root 0000000 0000000 # Newlines are not allowed in "-strings.
a = "
"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/no-close-10.toml 0000664 0000000 0000000 00000000061 15130702260 0031663 0 ustar 00root root 0000000 0000000 # Newlines are not allowed in '-strings.
a = '
'
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/no-open-01.toml 0000664 0000000 0000000 00000000007 15130702260 0031517 0 ustar 00root root 0000000 0000000 s = a"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/no-open-02.toml 0000664 0000000 0000000 00000000011 15130702260 0031513 0 ustar 00root root 0000000 0000000 a = [a"]
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/no-open-03.toml 0000664 0000000 0000000 00000000007 15130702260 0031521 0 ustar 00root root 0000000 0000000 s = a'
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/no-open-04.toml 0000664 0000000 0000000 00000000011 15130702260 0031515 0 ustar 00root root 0000000 0000000 a = [a']
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/no-open-05.toml 0000664 0000000 0000000 00000000011 15130702260 0031516 0 ustar 00root root 0000000 0000000 a = a"""
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/no-open-06.toml 0000664 0000000 0000000 00000000013 15130702260 0031521 0 ustar 00root root 0000000 0000000 a = [a"""]
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/no-open-07.toml 0000664 0000000 0000000 00000000011 15130702260 0031520 0 ustar 00root root 0000000 0000000 a = a'''
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/no-open-08.toml 0000664 0000000 0000000 00000000013 15130702260 0031523 0 ustar 00root root 0000000 0000000 a = [a''']
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/text-after-string.toml 0000664 0000000 0000000 00000000054 15130702260 0033317 0 ustar 00root root 0000000 0000000 string = "Is there life after strings?" No.
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/string/wrong-close.toml 0000664 0000000 0000000 00000000047 15130702260 0032171 0 ustar 00root root 0000000 0000000 bad-ending-quote = "double and single'
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/ 0000775 0000000 0000000 00000000000 15130702260 0026615 5 ustar 00root root 0000000 0000000 append-with-dotted-keys-01.toml 0000664 0000000 0000000 00000000753 15130702260 0034330 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table # First a.b.c defines a table: a.b.c = {z=9}
#
# Then we define a.b.c.t = "str" to add a str to the above table, making it:
#
# a.b.c = {z=9, t="..."}
#
# While this makes sense, logically, it was decided this is not valid TOML as
# it's too confusing/convoluted.
#
# See: https://github.com/toml-lang/toml/issues/846
# https://github.com/toml-lang/toml/pull/859
[a.b.c]
z = 9
[a]
b.c.t = "Using dotted keys to add to [a.b.c] after explicitly defining it above is not allowed"
append-with-dotted-keys-02.toml 0000664 0000000 0000000 00000000406 15130702260 0034324 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table # This is the same issue as in injection-1.toml, except that nests one level
# deeper. See that file for a more complete description.
[a.b.c.d]
z = 9
[a]
b.c.d.k.t = "Using dotted keys to add to [a.b.c.d] after explicitly defining it above is not allowed"
append-with-dotted-keys-03.toml 0000664 0000000 0000000 00000000025 15130702260 0034322 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table [[a.b]]
[a]
b.y = 2
append-with-dotted-keys-04.toml 0000664 0000000 0000000 00000000141 15130702260 0034322 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table [dependencies.foo]
version = "0.16"
[dependencies]
libc = "0.2"
[dependencies]
rand = "0.3.14"
append-with-dotted-keys-05.toml 0000664 0000000 0000000 00000000022 15130702260 0034321 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table a.b.c = 1
a.b = 2
append-with-dotted-keys-06.toml 0000664 0000000 0000000 00000000016 15130702260 0034325 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table a = 1
a.b = 2
append-with-dotted-keys-07.toml 0000664 0000000 0000000 00000000036 15130702260 0034330 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table a = {k1 = 1, k1.name = "joe"}
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/array-empty.toml 0000664 0000000 0000000 00000000032 15130702260 0031757 0 ustar 00root root 0000000 0000000 [[]]
name = "Born to Run"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/array-implicit.toml 0000664 0000000 0000000 00000001156 15130702260 0032443 0 ustar 00root root 0000000 0000000 # This test is a bit tricky. It should fail because the first use of
# `[[albums.songs]]` without first declaring `albums` implies that `albums`
# must be a table. The alternative would be quite weird. Namely, it wouldn't
# comply with the TOML spec: "Each double-bracketed sub-table will belong to
# the most *recently* defined table element *above* it."
#
# This is in contrast to the *valid* test, table-array-implicit where
# `[[albums.songs]]` works by itself, so long as `[[albums]]` isn't declared
# later. (Although, `[albums]` could be.)
[[albums.songs]]
name = "Glory Days"
[[albums]]
name = "Born in the USA"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/array-no-close-01.toml 0000664 0000000 0000000 00000000037 15130702260 0032563 0 ustar 00root root 0000000 0000000 [[albums]
name = "Born to Run"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/array-no-close-02.toml 0000664 0000000 0000000 00000000042 15130702260 0032560 0 ustar 00root root 0000000 0000000 [[closing-bracket.missing]
blaa=2
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/array-no-close-03.toml 0000664 0000000 0000000 00000000012 15130702260 0032556 0 ustar 00root root 0000000 0000000 [[a
[[b]]
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/array-no-close-04.toml 0000664 0000000 0000000 00000000012 15130702260 0032557 0 ustar 00root root 0000000 0000000 [[a
b = 2
bare-invalid-character-01.toml 0000664 0000000 0000000 00000000014 15130702260 0034133 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table [!]
k = 123
bare-invalid-character-02.toml 0000664 0000000 0000000 00000000023 15130702260 0034134 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table [bare!key]
k = 123
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/dot.toml 0000664 0000000 0000000 00000000012 15130702260 0030271 0 ustar 00root root 0000000 0000000 [.]
k = 1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/dotdot.toml 0000664 0000000 0000000 00000000013 15130702260 0031001 0 ustar 00root root 0000000 0000000 [..]
k = 1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/duplicate-key-01.toml 0000664 0000000 0000000 00000000025 15130702260 0032465 0 ustar 00root root 0000000 0000000 [a]
b = 1
[a]
c = 2
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/duplicate-key-02.toml 0000664 0000000 0000000 00000000063 15130702260 0032470 0 ustar 00root root 0000000 0000000 [fruit]
type = "apple"
[fruit.type]
apple = "yes"
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/duplicate-key-03.toml 0000664 0000000 0000000 00000000055 15130702260 0032472 0 ustar 00root root 0000000 0000000 [fruit]
apple.color = "red"
[[fruit.apple]]
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/duplicate-key-04.toml 0000664 0000000 0000000 00000000065 15130702260 0032474 0 ustar 00root root 0000000 0000000 [fruit]
apple.color = "red"
[fruit.apple] # INVALID
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/duplicate-key-05.toml 0000664 0000000 0000000 00000000100 15130702260 0032463 0 ustar 00root root 0000000 0000000 [fruit]
apple.taste.sweet = true
[fruit.apple.taste] # INVALID
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/duplicate-key-06.toml 0000664 0000000 0000000 00000000016 15130702260 0032472 0 ustar 00root root 0000000 0000000 [tbl]
[[tbl]]
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/duplicate-key-07.toml 0000664 0000000 0000000 00000000016 15130702260 0032473 0 ustar 00root root 0000000 0000000 [[tbl]]
[tbl]
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/duplicate-key-08.toml 0000664 0000000 0000000 00000000046 15130702260 0032477 0 ustar 00root root 0000000 0000000 [a]
b = { c = 2, d = {} }
[a.b]
c = 2
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/duplicate-key-09.toml 0000664 0000000 0000000 00000000042 15130702260 0032474 0 ustar 00root root 0000000 0000000 [a]
foo="bar"
[a.b]
foo="bar"
[a]
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/duplicate-key-10.toml 0000664 0000000 0000000 00000000017 15130702260 0032466 0 ustar 00root root 0000000 0000000 a = []
[[a.b]]
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/empty-implicit-table.toml 0000664 0000000 0000000 00000000023 15130702260 0033540 0 ustar 00root root 0000000 0000000 [naughty..naughty]
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/empty.toml 0000664 0000000 0000000 00000000003 15130702260 0030641 0 ustar 00root root 0000000 0000000 []
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/equals-sign.toml 0000664 0000000 0000000 00000000013 15130702260 0031734 0 ustar 00root root 0000000 0000000 [name=bad]
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/llbrace.toml 0000664 0000000 0000000 00000000013 15130702260 0031110 0 ustar 00root root 0000000 0000000 [ [table]]
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/multiline-key-01.toml 0000664 0000000 0000000 00000000022 15130702260 0032512 0 ustar 00root root 0000000 0000000 ["""tbl"""]
k = 1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/multiline-key-02.toml 0000664 0000000 0000000 00000000022 15130702260 0032513 0 ustar 00root root 0000000 0000000 ['''tbl''']
k = 1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/nested-brackets-close.toml0000664 0000000 0000000 00000000017 15130702260 0033671 0 ustar 00root root 0000000 0000000 [a]b]
zyx = 42
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/nested-brackets-open.toml 0000664 0000000 0000000 00000000017 15130702260 0033525 0 ustar 00root root 0000000 0000000 [a[b]
zyx = 42
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/newline-01.toml 0000664 0000000 0000000 00000000015 15130702260 0031365 0 ustar 00root root 0000000 0000000 [tbl
]
k = 1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/newline-02.toml 0000664 0000000 0000000 00000000017 15130702260 0031370 0 ustar 00root root 0000000 0000000 ["tbl
"]
k = 1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/newline-03.toml 0000664 0000000 0000000 00000000017 15130702260 0031371 0 ustar 00root root 0000000 0000000 ["tbl"
]
k = 1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/newline-04.toml 0000664 0000000 0000000 00000000016 15130702260 0031371 0 ustar 00root root 0000000 0000000 [tbl.
]
k = 1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/newline-05.toml 0000664 0000000 0000000 00000000021 15130702260 0031366 0 ustar 00root root 0000000 0000000 [tbl
.sub]
k = 1
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/no-close-01.toml 0000664 0000000 0000000 00000000041 15130702260 0031442 0 ustar 00root root 0000000 0000000 [where will it end
name = value
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/no-close-02.toml 0000664 0000000 0000000 00000000042 15130702260 0031444 0 ustar 00root root 0000000 0000000 [closing-bracket.missingö
blaa=2
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/no-close-03.toml 0000664 0000000 0000000 00000000043 15130702260 0031446 0 ustar 00root root 0000000 0000000 ["where will it end]
name = value
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/no-close-04.toml 0000664 0000000 0000000 00000000002 15130702260 0031442 0 ustar 00root root 0000000 0000000 [
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/no-close-05.toml 0000664 0000000 0000000 00000000013 15130702260 0031445 0 ustar 00root root 0000000 0000000 [fwfw.wafw
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/no-close-06.toml 0000664 0000000 0000000 00000000016 15130702260 0031451 0 ustar 00root root 0000000 0000000 [a
[b]
[c
[d]
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/no-close-07.toml 0000664 0000000 0000000 00000000004 15130702260 0031447 0 ustar 00root root 0000000 0000000 [']
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/no-close-08.toml 0000664 0000000 0000000 00000000006 15130702260 0031452 0 ustar 00root root 0000000 0000000 [''']
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/no-close-09.toml 0000664 0000000 0000000 00000000044 15130702260 0031455 0 ustar 00root root 0000000 0000000 ["where will it end""]
name = value
overwrite-array-in-parent.toml 0000664 0000000 0000000 00000000070 15130702260 0034465 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table [[parent-table.arr]]
[parent-table]
not-arr = 1
arr = 2
overwrite-bool-with-array.toml 0000664 0000000 0000000 00000000015 15130702260 0034473 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table a=true
[[a]]
overwrite-with-deep-table.toml 0000664 0000000 0000000 00000000016 15130702260 0034427 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table a=1
[a.b.c.d]
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/redefine-01.toml 0000664 0000000 0000000 00000000116 15130702260 0031507 0 ustar 00root root 0000000 0000000 # Define b as int, and try to use it as a table: error
[a]
b = 1
[a.b]
c = 2
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/redefine-02.toml 0000664 0000000 0000000 00000000031 15130702260 0031504 0 ustar 00root root 0000000 0000000 [t1]
t2.t3.v = 0
[t1.t2]
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/redefine-03.toml 0000664 0000000 0000000 00000000034 15130702260 0031510 0 ustar 00root root 0000000 0000000 [t1]
t2.t3.v = 0
[t1.t2.t3]
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/rrbrace.toml 0000664 0000000 0000000 00000000013 15130702260 0031124 0 ustar 00root root 0000000 0000000 [[table] ]
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/super-twice.toml 0000664 0000000 0000000 00000000016 15130702260 0031756 0 ustar 00root root 0000000 0000000 [a.b]
[a]
[a]
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/text-after-table.toml 0000664 0000000 0000000 00000000037 15130702260 0032662 0 ustar 00root root 0000000 0000000 [error] this shouldn't be here
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/trailing-dot.toml 0000664 0000000 0000000 00000000005 15130702260 0032102 0 ustar 00root root 0000000 0000000 [a.]
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/whitespace.toml 0000664 0000000 0000000 00000000016 15130702260 0031643 0 ustar 00root root 0000000 0000000 [invalid key]
hukkin-tomli-7940ff4/tests/data/invalid/_external/toml-test/invalid/table/with-pound.toml 0000664 0000000 0000000 00000000030 15130702260 0031601 0 ustar 00root root 0000000 0000000 [key#group]
answer = 42
hukkin-tomli-7940ff4/tests/data/invalid/array-missing-comma.toml 0000664 0000000 0000000 00000000024 15130702260 0024737 0 ustar 00root root 0000000 0000000 arrr = [true false]
hukkin-tomli-7940ff4/tests/data/invalid/array-of-tables/ 0000775 0000000 0000000 00000000000 15130702260 0023157 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/array-of-tables/overwrite-array-in-parent.toml 0000664 0000000 0000000 00000000070 15130702260 0031106 0 ustar 00root root 0000000 0000000 [[parent-table.arr]]
[parent-table]
not-arr = 1
arr = 2
hukkin-tomli-7940ff4/tests/data/invalid/array-of-tables/overwrite-bool-with-aot.toml 0000664 0000000 0000000 00000000014 15130702260 0030560 0 ustar 00root root 0000000 0000000 a=true
[[a]] hukkin-tomli-7940ff4/tests/data/invalid/array/ 0000775 0000000 0000000 00000000000 15130702260 0021305 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/array/file-end-after-val.toml 0000664 0000000 0000000 00000000004 15130702260 0025536 0 ustar 00root root 0000000 0000000 a=[1 hukkin-tomli-7940ff4/tests/data/invalid/array/unclosed-after-item.toml 0000664 0000000 0000000 00000000005 15130702260 0026044 0 ustar 00root root 0000000 0000000 v=[1, hukkin-tomli-7940ff4/tests/data/invalid/array/unclosed-empty.toml 0000664 0000000 0000000 00000000003 15130702260 0025143 0 ustar 00root root 0000000 0000000 v=[ hukkin-tomli-7940ff4/tests/data/invalid/basic-str-ends-in-escape.toml 0000664 0000000 0000000 00000000034 15130702260 0025541 0 ustar 00root root 0000000 0000000 "backslash is the last char\ hukkin-tomli-7940ff4/tests/data/invalid/boolean/ 0000775 0000000 0000000 00000000000 15130702260 0021606 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/boolean/invalid-false-casing.toml 0000664 0000000 0000000 00000000011 15130702260 0026453 0 ustar 00root root 0000000 0000000 val=falsE hukkin-tomli-7940ff4/tests/data/invalid/boolean/invalid-true-casing.toml 0000664 0000000 0000000 00000000010 15130702260 0026337 0 ustar 00root root 0000000 0000000 val=trUe hukkin-tomli-7940ff4/tests/data/invalid/dates-and-times/ 0000775 0000000 0000000 00000000000 15130702260 0023146 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/dates-and-times/invalid-day.toml 0000664 0000000 0000000 00000000056 15130702260 0026245 0 ustar 00root root 0000000 0000000 "only 28 or 29 days in february" = 1988-02-30
hukkin-tomli-7940ff4/tests/data/invalid/dotted-keys/ 0000775 0000000 0000000 00000000000 15130702260 0022423 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/dotted-keys/access-non-table.toml 0000664 0000000 0000000 00000000024 15130702260 0026432 0 ustar 00root root 0000000 0000000 a = false
a.b = true hukkin-tomli-7940ff4/tests/data/invalid/dotted-keys/extend-defined-aot.toml 0000664 0000000 0000000 00000000035 15130702260 0026762 0 ustar 00root root 0000000 0000000 [[tab.arr]]
[tab]
arr.val1=1
hukkin-tomli-7940ff4/tests/data/invalid/dotted-keys/extend-defined-table-with-subtable.toml 0000664 0000000 0000000 00000000046 15130702260 0032040 0 ustar 00root root 0000000 0000000 [a.b.c.d]
z = 9
[a]
b.c.d.k.t = 8
hukkin-tomli-7940ff4/tests/data/invalid/dotted-keys/extend-defined-table.toml 0000664 0000000 0000000 00000000040 15130702260 0027262 0 ustar 00root root 0000000 0000000 [a.b.c]
z = 9
[a]
b.c.t = 9
hukkin-tomli-7940ff4/tests/data/invalid/inline-table-missing-comma.toml 0000664 0000000 0000000 00000000063 15130702260 0026167 0 ustar 00root root 0000000 0000000 arrr = { comma-missing = true valid-toml = false }
hukkin-tomli-7940ff4/tests/data/invalid/inline-table/ 0000775 0000000 0000000 00000000000 15130702260 0022532 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/inline-table/define-twice-in-subtable.toml 0000664 0000000 0000000 00000000055 15130702260 0030175 0 ustar 00root root 0000000 0000000 table1 = { table2.dupe = 1, table2.dupe = 2 } hukkin-tomli-7940ff4/tests/data/invalid/inline-table/define-twice.toml 0000664 0000000 0000000 00000000036 15130702260 0025771 0 ustar 00root root 0000000 0000000 table = { dupe = 1, dupe = 2 } hukkin-tomli-7940ff4/tests/data/invalid/inline-table/file-end-after-key-val.toml 0000664 0000000 0000000 00000000006 15130702260 0027553 0 ustar 00root root 0000000 0000000 a={b=1 hukkin-tomli-7940ff4/tests/data/invalid/inline-table/mutate.toml 0000664 0000000 0000000 00000000025 15130702260 0024723 0 ustar 00root root 0000000 0000000 a = { b = 1 }
a.b = 2 hukkin-tomli-7940ff4/tests/data/invalid/inline-table/override-val-in-table.toml 0000664 0000000 0000000 00000000106 15130702260 0027514 0 ustar 00root root 0000000 0000000 [tab.nested]
inline-t = { nest = {} }
[tab]
nested.inline-t.nest = 2
hukkin-tomli-7940ff4/tests/data/invalid/inline-table/override-val-with-array.toml 0000664 0000000 0000000 00000000054 15130702260 0030112 0 ustar 00root root 0000000 0000000 inline-t = { nest = {} }
[[inline-t.nest]]
hukkin-tomli-7940ff4/tests/data/invalid/inline-table/override-val-with-table.toml 0000664 0000000 0000000 00000000052 15130702260 0030061 0 ustar 00root root 0000000 0000000 inline-t = { nest = {} }
[inline-t.nest]
hukkin-tomli-7940ff4/tests/data/invalid/inline-table/overwrite-implicitly.toml 0000664 0000000 0000000 00000000027 15130702260 0027631 0 ustar 00root root 0000000 0000000 a = { b = 1, b.c = 2 }
hukkin-tomli-7940ff4/tests/data/invalid/inline-table/overwrite-value-in-inner-array.toml 0000664 0000000 0000000 00000000065 15130702260 0031421 0 ustar 00root root 0000000 0000000 tab = { inner.table = [{}], inner.table.val = "bad" } hukkin-tomli-7940ff4/tests/data/invalid/inline-table/overwrite-value-in-inner-table.toml 0000664 0000000 0000000 00000000067 15130702260 0031374 0 ustar 00root root 0000000 0000000 tab = { inner = { dog = "best" }, inner.cat = "worst" } hukkin-tomli-7940ff4/tests/data/invalid/inline-table/unclosed-empty.toml 0000664 0000000 0000000 00000000003 15130702260 0026370 0 ustar 00root root 0000000 0000000 a={ hukkin-tomli-7940ff4/tests/data/invalid/invalid-comment-char.toml 0000664 0000000 0000000 00000000047 15130702260 0025066 0 ustar 00root root 0000000 0000000 # form feed () not allowed in comments hukkin-tomli-7940ff4/tests/data/invalid/invalid-escaped-unicode.toml 0000664 0000000 0000000 00000000033 15130702260 0025534 0 ustar 00root root 0000000 0000000 escaped-unicode = "\uabag"
hukkin-tomli-7940ff4/tests/data/invalid/invalid-hex.toml 0000664 0000000 0000000 00000000022 15130702260 0023266 0 ustar 00root root 0000000 0000000 hex = 0xgabba00f1
hukkin-tomli-7940ff4/tests/data/invalid/keys-and-vals/ 0000775 0000000 0000000 00000000000 15130702260 0022645 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/keys-and-vals/ends-early-table-def.toml 0000664 0000000 0000000 00000000012 15130702260 0027417 0 ustar 00root root 0000000 0000000 [fwfw.wafw hukkin-tomli-7940ff4/tests/data/invalid/keys-and-vals/ends-early.toml 0000664 0000000 0000000 00000000005 15130702260 0025600 0 ustar 00root root 0000000 0000000 fs.fw hukkin-tomli-7940ff4/tests/data/invalid/keys-and-vals/no-value.toml 0000664 0000000 0000000 00000000015 15130702260 0025264 0 ustar 00root root 0000000 0000000 why-no-value= hukkin-tomli-7940ff4/tests/data/invalid/keys-and-vals/only-ws-after-dot.toml 0000664 0000000 0000000 00000000003 15130702260 0027026 0 ustar 00root root 0000000 0000000 fs. hukkin-tomli-7940ff4/tests/data/invalid/keys-and-vals/overwrite-with-deep-table.toml 0000664 0000000 0000000 00000000016 15130702260 0030536 0 ustar 00root root 0000000 0000000 a=1
[a.b.c.d]
hukkin-tomli-7940ff4/tests/data/invalid/literal-str/ 0000775 0000000 0000000 00000000000 15130702260 0022431 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/literal-str/unclosed.toml 0000664 0000000 0000000 00000000016 15130702260 0025137 0 ustar 00root root 0000000 0000000 unclosed='dwdd hukkin-tomli-7940ff4/tests/data/invalid/missing-closing-double-square-bracket.toml 0000664 0000000 0000000 00000000042 15130702260 0030344 0 ustar 00root root 0000000 0000000 [[closing-bracket.missing]
blaa=2
hukkin-tomli-7940ff4/tests/data/invalid/missing-closing-square-bracket.toml 0000664 0000000 0000000 00000000042 15130702260 0027074 0 ustar 00root root 0000000 0000000 [closing-bracket.missingö
blaa=2
hukkin-tomli-7940ff4/tests/data/invalid/multiline-basic-str/ 0000775 0000000 0000000 00000000000 15130702260 0024056 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/multiline-basic-str/carriage-return.toml 0000664 0000000 0000000 00000000105 15130702260 0030041 0 ustar 00root root 0000000 0000000 s="""cr is not an allowed line ending
but we just tried to use it
""" hukkin-tomli-7940ff4/tests/data/invalid/multiline-basic-str/escape-only.toml 0000664 0000000 0000000 00000000016 15130702260 0027167 0 ustar 00root root 0000000 0000000 bee = """\"""
hukkin-tomli-7940ff4/tests/data/invalid/multiline-basic-str/file-ends-after-opening.toml 0000664 0000000 0000000 00000000005 15130702260 0031350 0 ustar 00root root 0000000 0000000 a=""" hukkin-tomli-7940ff4/tests/data/invalid/multiline-basic-str/last-line-escape.toml 0000664 0000000 0000000 00000000035 15130702260 0030077 0 ustar 00root root 0000000 0000000 bee = """
hee \
gee \ """
hukkin-tomli-7940ff4/tests/data/invalid/multiline-basic-str/unclosed-ends-in-whitespace-escape.toml 0000664 0000000 0000000 00000000024 15130702260 0033506 0 ustar 00root root 0000000 0000000 bee = """
hee
gee\ hukkin-tomli-7940ff4/tests/data/invalid/multiline-literal-str/ 0000775 0000000 0000000 00000000000 15130702260 0024431 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/multiline-literal-str/file-ends-after-opening.toml 0000664 0000000 0000000 00000000005 15130702260 0031723 0 ustar 00root root 0000000 0000000 a=''' hukkin-tomli-7940ff4/tests/data/invalid/multiline-literal-str/unclosed.toml 0000664 0000000 0000000 00000000024 15130702260 0027136 0 ustar 00root root 0000000 0000000 bee = '''
hee
gee '' hukkin-tomli-7940ff4/tests/data/invalid/non-scalar-escaped.toml 0000664 0000000 0000000 00000000012 15130702260 0024514 0 ustar 00root root 0000000 0000000 a="\ud800" hukkin-tomli-7940ff4/tests/data/invalid/table/ 0000775 0000000 0000000 00000000000 15130702260 0021256 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/invalid/table/eof-after-opening.toml 0000664 0000000 0000000 00000000001 15130702260 0025447 0 ustar 00root root 0000000 0000000 [ hukkin-tomli-7940ff4/tests/data/invalid/table/redefine-1.toml 0000664 0000000 0000000 00000000031 15130702260 0024064 0 ustar 00root root 0000000 0000000 [t1]
t2.t3.v = 0
[t1.t2]
hukkin-tomli-7940ff4/tests/data/invalid/table/redefine-2.toml 0000664 0000000 0000000 00000000034 15130702260 0024070 0 ustar 00root root 0000000 0000000 [t1]
t2.t3.v = 0
[t1.t2.t3]
hukkin-tomli-7940ff4/tests/data/invalid/unclosed-multiline-string.toml 0000664 0000000 0000000 00000000050 15130702260 0026177 0 ustar 00root root 0000000 0000000 not-closed= """
diibaa
blibae ete
eteta
hukkin-tomli-7940ff4/tests/data/invalid/unclosed-string.toml 0000664 0000000 0000000 00000000034 15130702260 0024201 0 ustar 00root root 0000000 0000000 "a-string".must-be = "closed hukkin-tomli-7940ff4/tests/data/valid/ 0000775 0000000 0000000 00000000000 15130702260 0017640 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/valid/_external/ 0000775 0000000 0000000 00000000000 15130702260 0021621 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/ 0000775 0000000 0000000 00000000000 15130702260 0023551 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/LICENSE 0000664 0000000 0000000 00000002067 15130702260 0024563 0 ustar 00root root 0000000 0000000 The MIT License (MIT)
Copyright (c) 2018 TOML authors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/ 0000775 0000000 0000000 00000000000 15130702260 0024650 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/ 0000775 0000000 0000000 00000000000 15130702260 0025766 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/array-subtables.json 0000664 0000000 0000000 00000000376 15130702260 0031767 0 ustar 00root root 0000000 0000000 {
"arr": [
{
"subtab": {
"val": {"type": "integer", "value": "1"}
}
},
{
"subtab": {
"val": {"type": "integer", "value": "2"}
}
}
]
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/array-subtables.toml 0000664 0000000 0000000 00000000067 15130702260 0031766 0 ustar 00root root 0000000 0000000 [[arr]]
[arr.subtab]
val=1
[[arr]]
[arr.subtab]
val=2
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/array.json 0000664 0000000 0000000 00000001466 15130702260 0030006 0 ustar 00root root 0000000 0000000 {
"comments": [
{"type": "integer", "value": "1"},
{"type": "integer", "value": "2"}
],
"dates": [
{"type": "datetime", "value": "1987-07-05T17:45:00Z"},
{"type": "datetime-local", "value": "1979-05-27T07:32:00"},
{"type": "date-local", "value": "2006-06-01"},
{"type": "time-local", "value": "11:00:00"}
],
"floats": [
{"type": "float", "value": "1.1"},
{"type": "float", "value": "2.1"},
{"type": "float", "value": "3.1"}
],
"ints": [
{"type": "integer", "value": "1"},
{"type": "integer", "value": "2"},
{"type": "integer", "value": "3"}
],
"strings": [
{"type": "string", "value": "a"},
{"type": "string", "value": "b"},
{"type": "string", "value": "c"}
]
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/array.toml 0000664 0000000 0000000 00000000312 15130702260 0027775 0 ustar 00root root 0000000 0000000 ints = [1, 2, 3, ]
floats = [1.1, 2.1, 3.1]
strings = ["a", "b", "c"]
dates = [
1987-07-05T17:45:00Z,
1979-05-27T07:32:00,
2006-06-01,
11:00:00,
]
comments = [
1,
2, #this is ok
]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/bool.json 0000664 0000000 0000000 00000000153 15130702260 0027613 0 ustar 00root root 0000000 0000000 {
"a": [
{"type": "bool", "value": "true"},
{"type": "bool", "value": "false"}
]
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/bool.toml 0000664 0000000 0000000 00000000022 15130702260 0027610 0 ustar 00root root 0000000 0000000 a = [true, false]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/empty.json 0000664 0000000 0000000 00000000036 15130702260 0030016 0 ustar 00root root 0000000 0000000 {
"thevoid": [[[[[]]]]]
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/empty.toml 0000664 0000000 0000000 00000000025 15130702260 0030016 0 ustar 00root root 0000000 0000000 thevoid = [[[[[]]]]]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/hetergeneous.json 0000664 0000000 0000000 00000000554 15130702260 0031362 0 ustar 00root root 0000000 0000000 {
"mixed": [
[
{"type": "integer", "value": "1"},
{"type": "integer", "value": "2"}
],
[
{"type": "string", "value": "a"},
{"type": "string", "value": "b"}
],
[
{"type": "float", "value": "1.1"},
{"type": "float", "value": "2.1"}
]
]
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/hetergeneous.toml 0000664 0000000 0000000 00000000051 15130702260 0031354 0 ustar 00root root 0000000 0000000 mixed = [[1, 2], ["a", "b"], [1.1, 2.1]]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/mixed-int-array.json 0000664 0000000 0000000 00000000220 15130702260 0031665 0 ustar 00root root 0000000 0000000 {
"arrays-and-ints": [
{"type": "integer", "value": "1"},
[{"type": "string", "value": "Arrays are not integers."}]
]
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/mixed-int-array.toml 0000664 0000000 0000000 00000000065 15130702260 0031676 0 ustar 00root root 0000000 0000000 arrays-and-ints = [1, ["Arrays are not integers."]]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/mixed-int-float.json 0000664 0000000 0000000 00000000170 15130702260 0031660 0 ustar 00root root 0000000 0000000 {
"ints-and-floats": [
{"type": "integer", "value": "1"},
{"type": "float", "value": "1.1"}
]
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/mixed-int-float.toml 0000664 0000000 0000000 00000000033 15130702260 0031660 0 ustar 00root root 0000000 0000000 ints-and-floats = [1, 1.1]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/mixed-int-string.json 0000664 0000000 0000000 00000000172 15130702260 0032063 0 ustar 00root root 0000000 0000000 {
"strings-and-ints": [
{"type": "string", "value": "hi"},
{"type": "integer", "value": "42"}
]
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/mixed-int-string.toml 0000664 0000000 0000000 00000000036 15130702260 0032064 0 ustar 00root root 0000000 0000000 strings-and-ints = ["hi", 42]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/mixed-string-table.json 0000664 0000000 0000000 00000001005 15130702260 0032354 0 ustar 00root root 0000000 0000000 {
"contributors": [
{"type": "string", "value": "Foo Bar \u003cfoo@example.com\u003e"},
{
"email": {"type": "string", "value": "bazqux@example.com"},
"name": {"type": "string", "value": "Baz Qux"},
"url": {"type": "string", "value": "https://example.com/bazqux"}
}
],
"mixed": [
{
"k": {"type": "string", "value": "a"}
},
{"type": "string", "value": "b"},
{"type": "integer", "value": "1"}
]
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/mixed-string-table.toml 0000664 0000000 0000000 00000000754 15130702260 0032370 0 ustar 00root root 0000000 0000000 contributors = [
"Foo Bar ",
{ name = "Baz Qux", email = "bazqux@example.com", url = "https://example.com/bazqux" }
]
# Start with a table as the first element. This tests a case that some libraries
# might have where they will check if the first entry is a table/map/hash/assoc
# array and then encode it as a table array. This was a reasonable thing to do
# before TOML 1.0 since arrays could only contain one type, but now it's no
# longer.
mixed = [{k="a"}, "b", 1]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/nested-double.json 0000664 0000000 0000000 00000000350 15130702260 0031411 0 ustar 00root root 0000000 0000000 {
"nest": [[
[{"type": "string", "value": "a"}],
[
{"type": "integer", "value": "1"},
{"type": "integer", "value": "2"},
[{"type": "integer", "value": "3"}]
]
]]
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/nested-double.toml 0000664 0000000 0000000 00000000050 15130702260 0031410 0 ustar 00root root 0000000 0000000 nest = [
[
["a"],
[1, 2, [3]]
]
]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/nested-inline-table.json 0000664 0000000 0000000 00000000047 15130702260 0032505 0 ustar 00root root 0000000 0000000 {
"a": [{
"b": {}
}]
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/nested-inline-table.toml 0000664 0000000 0000000 00000000023 15130702260 0032501 0 ustar 00root root 0000000 0000000 a = [ { b = {} } ]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/nested.json 0000664 0000000 0000000 00000000157 15130702260 0030146 0 ustar 00root root 0000000 0000000 {
"nest": [
[{"type": "string", "value": "a"}],
[{"type": "string", "value": "b"}]
]
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/nested.toml 0000664 0000000 0000000 00000000026 15130702260 0030143 0 ustar 00root root 0000000 0000000 nest = [["a"], ["b"]]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/nospaces.json 0000664 0000000 0000000 00000000230 15130702260 0030467 0 ustar 00root root 0000000 0000000 {
"ints": [
{"type": "integer", "value": "1"},
{"type": "integer", "value": "2"},
{"type": "integer", "value": "3"}
]
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/nospaces.toml 0000664 0000000 0000000 00000000017 15130702260 0030474 0 ustar 00root root 0000000 0000000 ints = [1,2,3]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/open-parent-table.json 0000664 0000000 0000000 00000000220 15130702260 0032170 0 ustar 00root root 0000000 0000000 {
"parent-table": {
"not-arr": {"type": "integer", "value": "1"},
"arr": [
{},
{}
]
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/open-parent-table.toml 0000664 0000000 0000000 00000000105 15130702260 0032174 0 ustar 00root root 0000000 0000000 [[parent-table.arr]]
[[parent-table.arr]]
[parent-table]
not-arr = 1
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/string-quote-comma-01.json 0000664 0000000 0000000 00000000217 15130702260 0032632 0 ustar 00root root 0000000 0000000 {
"title": [
{"type": "string", "value": "Client: \"XXXX\", Job: XXXX"},
{"type": "string", "value": "Code: XXXX"}
]
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/string-quote-comma-01.toml 0000664 0000000 0000000 00000000070 15130702260 0032631 0 ustar 00root root 0000000 0000000 title = [
"Client: \"XXXX\", Job: XXXX",
"Code: XXXX"
]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/string-quote-comma-02.json 0000664 0000000 0000000 00000000070 15130702260 0032630 0 ustar 00root root 0000000 0000000 {
"title": [{"type": "string", "value": " \", "}]
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/string-quote-comma-02.toml 0000664 0000000 0000000 00000000024 15130702260 0032631 0 ustar 00root root 0000000 0000000 title = [ " \", ",]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/string-with-comma-01.json 0000664 0000000 0000000 00000000213 15130702260 0032444 0 ustar 00root root 0000000 0000000 {
"title": [
{"type": "string", "value": "Client: XXXX, Job: XXXX"},
{"type": "string", "value": "Code: XXXX"}
]
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/string-with-comma-01.toml 0000664 0000000 0000000 00000000064 15130702260 0032452 0 ustar 00root root 0000000 0000000 title = [
"Client: XXXX, Job: XXXX",
"Code: XXXX"
]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/string-with-comma-02.json 0000664 0000000 0000000 00000000214 15130702260 0032446 0 ustar 00root root 0000000 0000000 {
"title": [
{"type": "string", "value": "Client: XXXX,\nJob: XXXX"},
{"type": "string", "value": "Code: XXXX"}
]
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/string-with-comma-02.toml 0000664 0000000 0000000 00000000070 15130702260 0032450 0 ustar 00root root 0000000 0000000 title = [
"""Client: XXXX,
Job: XXXX""",
"Code: XXXX"
]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/strings.json 0000664 0000000 0000000 00000000335 15130702260 0030353 0 ustar 00root root 0000000 0000000 {
"string_array": [
{"type": "string", "value": "all"},
{"type": "string", "value": "strings"},
{"type": "string", "value": "are the same"},
{"type": "string", "value": "type"}
]
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/strings.toml 0000664 0000000 0000000 00000000103 15130702260 0030346 0 ustar 00root root 0000000 0000000 string_array = [ "all", 'strings', """are the same""", '''type''']
table-array-string-backslash.json 0000664 0000000 0000000 00000000123 15130702260 0034236 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array {
"foo": [{
"bar": {"type": "string", "value": "\"{{baz}}\""}
}]
}
table-array-string-backslash.toml 0000664 0000000 0000000 00000000037 15130702260 0034244 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array foo = [ { bar="\"{{baz}}\""} ]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/trailing-comma.json 0000664 0000000 0000000 00000000475 15130702260 0031572 0 ustar 00root root 0000000 0000000 {
"arr-1": [{"type": "integer", "value": "1"}],
"arr-3": [{"type": "integer", "value": "4"}],
"arr-2": [
{"type": "integer", "value": "2"},
{"type": "integer", "value": "3"}
],
"arr-4": [
{"type": "integer", "value": "5"},
{"type": "integer", "value": "6"}
]
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/array/trailing-comma.toml 0000664 0000000 0000000 00000000101 15130702260 0031556 0 ustar 00root root 0000000 0000000 arr-1 = [1,]
arr-2 = [2,3,]
arr-3 = [4,
]
arr-4 = [
5,
6,
]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/bool/ 0000775 0000000 0000000 00000000000 15130702260 0025603 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/bool/bool.json 0000664 0000000 0000000 00000000134 15130702260 0027427 0 ustar 00root root 0000000 0000000 {
"f": {"type": "bool", "value": "false"},
"t": {"type": "bool", "value": "true"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/bool/bool.toml 0000664 0000000 0000000 00000000023 15130702260 0027426 0 ustar 00root root 0000000 0000000 t = true
f = false
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/comment/ 0000775 0000000 0000000 00000000000 15130702260 0026312 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/comment/after-literal-no-ws.json 0000664 0000000 0000000 00000000304 15130702260 0032776 0 ustar 00root root 0000000 0000000 {
"false": {"type": "bool", "value": "false"},
"inf": {"type": "float", "value": "inf"},
"nan": {"type": "float", "value": "nan"},
"true": {"type": "bool", "value": "true"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/comment/after-literal-no-ws.toml 0000664 0000000 0000000 00000000107 15130702260 0033001 0 ustar 00root root 0000000 0000000 inf=inf#infinity
nan=nan#not a number
true=true#true
false=false#false
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/comment/at-eof.json 0000664 0000000 0000000 00000000064 15130702260 0030360 0 ustar 00root root 0000000 0000000 {
"key": {"type": "string", "value": "value"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/comment/at-eof.toml 0000664 0000000 0000000 00000000125 15130702260 0030360 0 ustar 00root root 0000000 0000000 # This is a full-line comment
key = "value" # This is a comment at the end of a line
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/comment/at-eof2.json 0000664 0000000 0000000 00000000064 15130702260 0030442 0 ustar 00root root 0000000 0000000 {
"key": {"type": "string", "value": "value"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/comment/at-eof2.toml 0000664 0000000 0000000 00000000125 15130702260 0030442 0 ustar 00root root 0000000 0000000 # This is a full-line comment
key = "value" # This is a comment at the end of a line
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/comment/everywhere.json 0000664 0000000 0000000 00000000776 15130702260 0031404 0 ustar 00root root 0000000 0000000 {
"aot": [
{
"k": {"type": "integer", "value": "98"}
},
{
"k": {"type": "integer", "value": "99"}
}
],
"group": {
"answer": {"type": "integer", "value": "42"},
"d": {"type": "date-local", "value": "1979-05-27"},
"dt": {"type": "datetime", "value": "1979-05-27T07:32:12-07:00"},
"more": [
{"type": "integer", "value": "42"},
{"type": "integer", "value": "42"}
]
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/comment/everywhere.toml 0000664 0000000 0000000 00000001213 15130702260 0031371 0 ustar 00root root 0000000 0000000 # Top comment.
# Top comment.
# Top comment.
# [no-extraneous-groups-please]
[group] # Comment
answer = 42 # Comment
# no-extraneous-keys-please = 999
# Inbetween comment.
more = [ # Comment
# What about multiple # comments?
# Can you handle it?
#
# Evil.
# Evil.
42, 42, # Comments within arrays are fun.
# What about multiple # comments?
# Can you handle it?
#
# Evil.
# Evil.
# ] Did I fool you?
] # Hopefully not.
# Make sure the space between the datetime and "#" isn't lexed.
dt = 1979-05-27T07:32:12-07:00 # c
d = 1979-05-27 # Comment
[[aot]] # Comment
k = 98 # Comment
[[aot]]# Comment
k = 99# Comment
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/comment/noeol.json 0000664 0000000 0000000 00000000003 15130702260 0030312 0 ustar 00root root 0000000 0000000 {}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/comment/noeol.toml 0000664 0000000 0000000 00000000053 15130702260 0030321 0 ustar 00root root 0000000 0000000 # single comment without any eol characters hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/comment/nonascii.json 0000664 0000000 0000000 00000000003 15130702260 0031001 0 ustar 00root root 0000000 0000000 {}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/comment/nonascii.toml 0000664 0000000 0000000 00000000040 15130702260 0031004 0 ustar 00root root 0000000 0000000 # ~ ÿ 𐀀
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/comment/tricky.json 0000664 0000000 0000000 00000002205 15130702260 0030511 0 ustar 00root root 0000000 0000000 {
"hash#tag": {
"#!": {"type": "string", "value": "hash bang"},
"arr5": [[[[[{"type": "string", "value": "#"}]]]]],
"arr3": [
{"type": "string", "value": "#"},
{"type": "string", "value": "#"},
{"type": "string", "value": "###"}
],
"arr4": [
{"type": "integer", "value": "1"},
{"type": "integer", "value": "2"},
{"type": "integer", "value": "3"},
{"type": "integer", "value": "4"}
],
"tbl1": {
"#": {"type": "string", "value": "}#"}
}
},
"section": {
"8": {"type": "string", "value": "eight"},
"eleven": {"type": "float", "value": "11.1"},
"five": {"type": "float", "value": "5.5"},
"four": {"type": "string", "value": "# no comment\n# nor this\n#also not comment"},
"one": {"type": "string", "value": "11"},
"six": {"type": "integer", "value": "6"},
"ten": {"type": "float", "value": "1000.0"},
"three": {"type": "string", "value": "#"},
"two": {"type": "string", "value": "22#"}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/comment/tricky.toml 0000664 0000000 0000000 00000000601 15130702260 0030511 0 ustar 00root root 0000000 0000000 [section]#attached comment
#[notsection]
one = "11"#cmt
two = "22#"
three = '#'
four = """# no comment
# nor this
#also not comment"""#is_comment
five = 5.5#66
six = 6#7
8 = "eight"
#nine = 99
ten = 10e2#1
eleven = 1.11e1#23
["hash#tag"]
"#!" = "hash bang"
arr3 = [ "#", '#', """###""" ]
arr4 = [ 1,# 9, 9,
2#,9
,#9
3#]
,4]
arr5 = [[[[#["#"],
["#"]]]]#]
]
tbl1 = { "#" = '}#'}#}}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/datetime/ 0000775 0000000 0000000 00000000000 15130702260 0026444 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/datetime/datetime.json 0000664 0000000 0000000 00000000213 15130702260 0031127 0 ustar 00root root 0000000 0000000 {
"lower": {"type": "datetime", "value": "1987-07-05T17:45:00Z"},
"space": {"type": "datetime", "value": "1987-07-05T17:45:00Z"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/datetime/datetime.toml 0000664 0000000 0000000 00000000173 15130702260 0031136 0 ustar 00root root 0000000 0000000 space = 1987-07-05 17:45:00Z
# ABNF is case-insensitive, both "Z" and "z" must be supported.
lower = 1987-07-05t17:45:00z
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/datetime/edge.json 0000664 0000000 0000000 00000000677 15130702260 0030255 0 ustar 00root root 0000000 0000000 {
"first-date": {"type": "date-local", "value": "0001-01-01"},
"first-local": {"type": "datetime-local", "value": "0001-01-01T00:00:00"},
"first-offset": {"type": "datetime", "value": "0001-01-01T00:00:00Z"},
"last-date": {"type": "date-local", "value": "9999-12-31"},
"last-local": {"type": "datetime-local", "value": "9999-12-31T23:59:59"},
"last-offset": {"type": "datetime", "value": "9999-12-31T23:59:59Z"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/datetime/edge.toml 0000664 0000000 0000000 00000000300 15130702260 0030236 0 ustar 00root root 0000000 0000000 first-offset = 0001-01-01 00:00:00Z
first-local = 0001-01-01 00:00:00
first-date = 0001-01-01
last-offset = 9999-12-31 23:59:59Z
last-local = 9999-12-31 23:59:59
last-date = 9999-12-31
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/datetime/invalid-date-in-string.json0000664 0000000 0000000 00000000070 15130702260 0033605 0 ustar 00root root 0000000 0000000 {
"s": {"type": "string", "value": "2020-01-01x"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/datetime/invalid-date-in-string.toml0000664 0000000 0000000 00000000022 15130702260 0033604 0 ustar 00root root 0000000 0000000 s = '2020-01-01x'
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/datetime/leap-year.json 0000664 0000000 0000000 00000000751 15130702260 0031221 0 ustar 00root root 0000000 0000000 {
"2000-date": {"type": "date-local", "value": "2000-02-29"},
"2000-datetime": {"type": "datetime", "value": "2000-02-29T15:15:15Z"},
"2000-datetime-local": {"type": "datetime-local", "value": "2000-02-29T15:15:15"},
"2024-date": {"type": "date-local", "value": "2024-02-29"},
"2024-datetime": {"type": "datetime", "value": "2024-02-29T15:15:15Z"},
"2024-datetime-local": {"type": "datetime-local", "value": "2024-02-29T15:15:15"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/datetime/leap-year.toml 0000664 0000000 0000000 00000000355 15130702260 0031223 0 ustar 00root root 0000000 0000000 2000-datetime = 2000-02-29 15:15:15Z
2000-datetime-local = 2000-02-29 15:15:15
2000-date = 2000-02-29
2024-datetime = 2024-02-29 15:15:15Z
2024-datetime-local = 2024-02-29 15:15:15
2024-date = 2024-02-29
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/datetime/local-date.json 0000664 0000000 0000000 00000000105 15130702260 0031340 0 ustar 00root root 0000000 0000000 {
"bestdayever": {"type": "date-local", "value": "1987-07-05"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/datetime/local-date.toml 0000664 0000000 0000000 00000000031 15130702260 0031340 0 ustar 00root root 0000000 0000000 bestdayever = 1987-07-05
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/datetime/local-time.json 0000664 0000000 0000000 00000000211 15130702260 0031357 0 ustar 00root root 0000000 0000000 {
"besttimeever": {"type": "time-local", "value": "17:45:00"},
"milliseconds": {"type": "time-local", "value": "10:32:00.555"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/datetime/local-time.toml 0000664 0000000 0000000 00000000064 15130702260 0031367 0 ustar 00root root 0000000 0000000 besttimeever = 17:45:00
milliseconds = 10:32:00.555
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/datetime/local.json 0000664 0000000 0000000 00000000342 15130702260 0030430 0 ustar 00root root 0000000 0000000 {
"local": {"type": "datetime-local", "value": "1987-07-05T17:45:00"},
"milli": {"type": "datetime-local", "value": "1977-12-21T10:32:00.555"},
"space": {"type": "datetime-local", "value": "1987-07-05T17:45:00"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/datetime/local.toml 0000664 0000000 0000000 00000000130 15130702260 0030425 0 ustar 00root root 0000000 0000000 local = 1987-07-05T17:45:00
milli = 1977-12-21T10:32:00.555
space = 1987-07-05 17:45:00
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/datetime/milliseconds.json 0000664 0000000 0000000 00000000455 15130702260 0032030 0 ustar 00root root 0000000 0000000 {
"utc1": {"type": "datetime", "value": "1987-07-05T17:45:56.123Z"},
"utc2": {"type": "datetime", "value": "1987-07-05T17:45:56.600Z"},
"wita1": {"type": "datetime", "value": "1987-07-05T17:45:56.123+08:00"},
"wita2": {"type": "datetime", "value": "1987-07-05T17:45:56.600+08:00"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/datetime/milliseconds.toml 0000664 0000000 0000000 00000000212 15130702260 0032021 0 ustar 00root root 0000000 0000000 utc1 = 1987-07-05T17:45:56.123Z
utc2 = 1987-07-05T17:45:56.6Z
wita1 = 1987-07-05T17:45:56.123+08:00
wita2 = 1987-07-05T17:45:56.6+08:00
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/datetime/no-seconds.json 0000664 0000000 0000000 00000000503 15130702260 0031405 0 ustar 00root root 0000000 0000000 {
"without-seconds-1": {"type": "time-local", "value": "13:37:00"},
"without-seconds-2": {"type": "datetime", "value": "1979-05-27T07:32:00Z"},
"without-seconds-3": {"type": "datetime", "value": "1979-05-27T07:32:00-07:00"},
"without-seconds-4": {"type": "datetime-local", "value": "1979-05-27T07:32:00"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/datetime/no-seconds.toml 0000664 0000000 0000000 00000000276 15130702260 0031416 0 ustar 00root root 0000000 0000000 # Seconds are optional in date-time and time.
without-seconds-1 = 13:37
without-seconds-2 = 1979-05-27 07:32Z
without-seconds-3 = 1979-05-27 07:32-07:00
without-seconds-4 = 1979-05-27T07:32
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/datetime/timezone.json 0000664 0000000 0000000 00000000436 15130702260 0031174 0 ustar 00root root 0000000 0000000 {
"nzdt": {"type": "datetime", "value": "1987-07-05T17:45:56+13:00"},
"nzst": {"type": "datetime", "value": "1987-07-05T17:45:56+12:00"},
"pdt": {"type": "datetime", "value": "1987-07-05T17:45:56-05:00"},
"utc": {"type": "datetime", "value": "1987-07-05T17:45:56Z"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/datetime/timezone.toml 0000664 0000000 0000000 00000000206 15130702260 0031171 0 ustar 00root root 0000000 0000000 utc = 1987-07-05T17:45:56Z
pdt = 1987-07-05T17:45:56-05:00
nzst = 1987-07-05T17:45:56+12:00
nzdt = 1987-07-05T17:45:56+13:00 # DST
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/empty-crlf.json 0000664 0000000 0000000 00000000003 15130702260 0027616 0 ustar 00root root 0000000 0000000 {}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/empty-crlf.toml 0000664 0000000 0000000 00000000002 15130702260 0027617 0 ustar 00root root 0000000 0000000
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/empty-lf.json 0000664 0000000 0000000 00000000003 15130702260 0027271 0 ustar 00root root 0000000 0000000 {}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/empty-lf.toml 0000664 0000000 0000000 00000000001 15130702260 0027271 0 ustar 00root root 0000000 0000000
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/empty-nothing.json 0000664 0000000 0000000 00000000003 15130702260 0030336 0 ustar 00root root 0000000 0000000 {}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/empty-nothing.toml 0000664 0000000 0000000 00000000000 15130702260 0030335 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/empty-space.json 0000664 0000000 0000000 00000000003 15130702260 0027763 0 ustar 00root root 0000000 0000000 {}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/empty-space.toml 0000664 0000000 0000000 00000000001 15130702260 0027763 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/empty-tab.json 0000664 0000000 0000000 00000000003 15130702260 0027436 0 ustar 00root root 0000000 0000000 {}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/empty-tab.toml 0000664 0000000 0000000 00000000001 15130702260 0027436 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/example.json 0000664 0000000 0000000 00000000520 15130702260 0027173 0 ustar 00root root 0000000 0000000 {
"best-day-ever": {"type": "datetime", "value": "1987-07-05T17:45:00Z"},
"numtheory": {
"boring": {"type": "bool", "value": "false"},
"perfection": [
{"type": "integer", "value": "6"},
{"type": "integer", "value": "28"},
{"type": "integer", "value": "496"}
]
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/example.toml 0000664 0000000 0000000 00000000133 15130702260 0027175 0 ustar 00root root 0000000 0000000 best-day-ever = 1987-07-05T17:45:00Z
[numtheory]
boring = false
perfection = [6, 28, 496]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/float/ 0000775 0000000 0000000 00000000000 15130702260 0025755 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/float/exponent.json 0000664 0000000 0000000 00000000667 15130702260 0030521 0 ustar 00root root 0000000 0000000 {
"lower": {"type": "float", "value": "300.0"},
"minustenth": {"type": "float", "value": "-0.1"},
"neg": {"type": "float", "value": "0.03"},
"pointlower": {"type": "float", "value": "310.0"},
"pointupper": {"type": "float", "value": "310.0"},
"pos": {"type": "float", "value": "300.0"},
"upper": {"type": "float", "value": "300.0"},
"zero": {"type": "float", "value": "3.0"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/float/exponent.toml 0000664 0000000 0000000 00000000162 15130702260 0030511 0 ustar 00root root 0000000 0000000 lower = 3e2
upper = 3E2
neg = 3e-2
pos = 3E+2
zero = 3e0
pointlower = 3.1e2
pointupper = 3.1E2
minustenth = -1E-1
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/float/float.json 0000664 0000000 0000000 00000000526 15130702260 0027760 0 ustar 00root root 0000000 0000000 {
"negpi": {"type": "float", "value": "-3.14"},
"pi": {"type": "float", "value": "3.14"},
"pospi": {"type": "float", "value": "3.14"},
"zero-intpart": {"type": "float", "value": "0.123"},
"leading-zero-fractional": {"type": "float", "value": "0.0123"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/float/float.toml 0000664 0000000 0000000 00000000134 15130702260 0027755 0 ustar 00root root 0000000 0000000 pi = 3.14
pospi = +3.14
negpi = -3.14
zero-intpart = 0.123
leading-zero-fractional = 0.0123
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/float/inf-and-nan.json 0000664 0000000 0000000 00000000524 15130702260 0030737 0 ustar 00root root 0000000 0000000 {
"infinity": {"type": "float", "value": "inf"},
"infinity_neg": {"type": "float", "value": "-inf"},
"infinity_plus": {"type": "float", "value": "inf"},
"nan": {"type": "float", "value": "nan"},
"nan_neg": {"type": "float", "value": "nan"},
"nan_plus": {"type": "float", "value": "nan"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/float/inf-and-nan.toml 0000664 0000000 0000000 00000000350 15130702260 0030736 0 ustar 00root root 0000000 0000000 # We don't encode +nan and -nan back with the signs; many languages don't
# support a sign on NaN (it doesn't really make much sense).
nan = nan
nan_neg = -nan
nan_plus = +nan
infinity = inf
infinity_neg = -inf
infinity_plus = +inf
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/float/long.json 0000664 0000000 0000000 00000000210 15130702260 0027600 0 ustar 00root root 0000000 0000000 {
"longpi": {"type": "float", "value": "3.141592653589793"},
"neglongpi": {"type": "float", "value": "-3.141592653589793"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/float/long.toml 0000664 0000000 0000000 00000000072 15130702260 0027610 0 ustar 00root root 0000000 0000000 longpi = 3.141592653589793
neglongpi = -3.141592653589793
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/float/max-int.json 0000664 0000000 0000000 00000000206 15130702260 0030223 0 ustar 00root root 0000000 0000000 {
"max_float": {"type": "float", "value": "9007199254740991"},
"min_float": {"type": "float", "value": "-9007199254740991"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/float/max-int.toml 0000664 0000000 0000000 00000000166 15130702260 0030232 0 ustar 00root root 0000000 0000000 # Maximum and minimum safe natural numbers.
max_float = 9_007_199_254_740_991.0
min_float = -9_007_199_254_740_991.0
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/float/underscore.json 0000664 0000000 0000000 00000000253 15130702260 0031021 0 ustar 00root root 0000000 0000000 {
"after": {"type": "float", "value": "3141.5927"},
"before": {"type": "float", "value": "3141.5927"},
"exponent": {"type": "float", "value": "3.0e14"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/float/underscore.toml 0000664 0000000 0000000 00000000070 15130702260 0031020 0 ustar 00root root 0000000 0000000 before = 3_141.5927
after = 3141.592_7
exponent = 3e1_4
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/float/zero.json 0000664 0000000 0000000 00000000651 15130702260 0027631 0 ustar 00root root 0000000 0000000 {
"exponent": {"type": "float", "value": "0"},
"exponent-signed-neg": {"type": "float", "value": "-0"},
"exponent-signed-pos": {"type": "float", "value": "0"},
"exponent-two-0": {"type": "float", "value": "0"},
"signed-neg": {"type": "float", "value": "-0"},
"signed-pos": {"type": "float", "value": "0"},
"zero": {"type": "float", "value": "0"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/float/zero.toml 0000664 0000000 0000000 00000000212 15130702260 0027624 0 ustar 00root root 0000000 0000000 zero = 0.0
signed-pos = +0.0
signed-neg = -0.0
exponent = 0e0
exponent-two-0 = 0e00
exponent-signed-pos = +0e0
exponent-signed-neg = -0e0
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/implicit-and-explicit-after.json 0000664 0000000 0000000 00000000302 15130702260 0033026 0 ustar 00root root 0000000 0000000 {
"a": {
"better": {"type": "integer", "value": "43"},
"b": {
"c": {
"answer": {"type": "integer", "value": "42"}
}
}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/implicit-and-explicit-after.toml 0000664 0000000 0000000 00000000045 15130702260 0033034 0 ustar 00root root 0000000 0000000 [a.b.c]
answer = 42
[a]
better = 43
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/implicit-and-explicit-before.json 0000664 0000000 0000000 00000000302 15130702260 0033167 0 ustar 00root root 0000000 0000000 {
"a": {
"better": {"type": "integer", "value": "43"},
"b": {
"c": {
"answer": {"type": "integer", "value": "42"}
}
}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/implicit-and-explicit-before.toml 0000664 0000000 0000000 00000000045 15130702260 0033175 0 ustar 00root root 0000000 0000000 [a]
better = 43
[a.b.c]
answer = 42
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/implicit-groups.json 0000664 0000000 0000000 00000000214 15130702260 0030667 0 ustar 00root root 0000000 0000000 {
"a": {
"b": {
"c": {
"answer": {"type": "integer", "value": "42"}
}
}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/implicit-groups.toml 0000664 0000000 0000000 00000000024 15130702260 0030670 0 ustar 00root root 0000000 0000000 [a.b.c]
answer = 42
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/inline-table/ 0000775 0000000 0000000 00000000000 15130702260 0027213 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/inline-table/array-01.json 0000664 0000000 0000000 00000001175 15130702260 0031446 0 ustar 00root root 0000000 0000000 {
"arr": [
{
"a": {"type": "integer", "value": "1"}
},
{
"a": {"type": "integer", "value": "2"}
}
],
"people": [
{
"first_name": {"type": "string", "value": "Bruce"},
"last_name": {"type": "string", "value": "Springsteen"}
},
{
"first_name": {"type": "string", "value": "Eric"},
"last_name": {"type": "string", "value": "Clapton"}
},
{
"first_name": {"type": "string", "value": "Bob"},
"last_name": {"type": "string", "value": "Seger"}
}
]
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/inline-table/array-01.toml 0000664 0000000 0000000 00000000310 15130702260 0031436 0 ustar 00root root 0000000 0000000 arr = [ {'a'= 1}, {'a'= 2} ]
people = [{first_name = "Bruce", last_name = "Springsteen"},
{first_name = "Eric", last_name = "Clapton"},
{first_name = "Bob", last_name = "Seger"}]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/inline-table/array-02.json 0000664 0000000 0000000 00000000027 15130702260 0031442 0 ustar 00root root 0000000 0000000 {
"a": {"a": []}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/inline-table/array-02.toml 0000664 0000000 0000000 00000000154 15130702260 0031445 0 ustar 00root root 0000000 0000000 # "No newlines are allowed between the curly braces unless they are valid within
# a value"
a = { a = [
]}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/inline-table/array-03.json 0000664 0000000 0000000 00000000402 15130702260 0031440 0 ustar 00root root 0000000 0000000 {
"b": {
"a": [
{"type": "integer", "value": "1"},
{"type": "integer", "value": "2"}
],
"b": [
{"type": "integer", "value": "3"},
{"type": "integer", "value": "4"}
]
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/inline-table/array-03.toml 0000664 0000000 0000000 00000000056 15130702260 0031447 0 ustar 00root root 0000000 0000000 b = { a = [
1,
2,
], b = [
3,
4,
]}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/inline-table/bool.json 0000664 0000000 0000000 00000000165 15130702260 0031043 0 ustar 00root root 0000000 0000000 {
"a": {
"a": {"type": "bool", "value": "true"},
"b": {"type": "bool", "value": "false"}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/inline-table/bool.toml 0000664 0000000 0000000 00000000032 15130702260 0031036 0 ustar 00root root 0000000 0000000 a = {a = true, b = false}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/inline-table/empty.json 0000664 0000000 0000000 00000000643 15130702260 0031247 0 ustar 00root root 0000000 0000000 {
"empty1": {},
"empty2": {},
"with_cmt": {},
"empty_in_array": [
{
"not_empty": {"type": "integer", "value": "1"}
},
{}
],
"empty_in_array2": [
{},
{
"not_empty": {"type": "integer", "value": "1"}
}
],
"many_empty": [
{},
{},
{}
],
"nested_empty": {
"empty": {}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/inline-table/empty.toml 0000664 0000000 0000000 00000000303 15130702260 0031242 0 ustar 00root root 0000000 0000000 empty1 = {}
empty2 = { }
empty_in_array = [ { not_empty = 1 }, {} ]
empty_in_array2 = [{},{not_empty=1}]
many_empty = [{},{},{}]
nested_empty = {"empty"={}}
with_cmt ={ }#nothing here
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/inline-table/end-in-bool.json 0000664 0000000 0000000 00000000352 15130702260 0032211 0 ustar 00root root 0000000 0000000 {
"black": {
"allow_prereleases": {"type": "bool", "value": "true"},
"python": {"type": "string", "value": "\u003e3.6"},
"version": {"type": "string", "value": "\u003e=18.9b0"}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/inline-table/end-in-bool.toml 0000664 0000000 0000000 00000000106 15130702260 0032210 0 ustar 00root root 0000000 0000000 black = { python=">3.6", version=">=18.9b0", allow_prereleases=true }
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/inline-table/inline-table.json 0000664 0000000 0000000 00000001071 15130702260 0032450 0 ustar 00root root 0000000 0000000 {
"name": {
"first": {"type": "string", "value": "Tom"},
"last": {"type": "string", "value": "Preston-Werner"}
},
"point": {
"x": {"type": "integer", "value": "1"},
"y": {"type": "integer", "value": "2"}
},
"simple": {
"a": {"type": "integer", "value": "1"}
},
"str-key": {
"a": {"type": "integer", "value": "1"}
},
"table-array": [
{
"a": {"type": "integer", "value": "1"}
},
{
"b": {"type": "integer", "value": "2"}
}
]
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/inline-table/inline-table.toml 0000664 0000000 0000000 00000000263 15130702260 0032454 0 ustar 00root root 0000000 0000000 name = { first = "Tom", last = "Preston-Werner" }
point = { x = 1, y = 2 }
simple = { a = 1 }
str-key = { "a" = 1 }
table-array = [{ "a" = 1 }, { "b" = 2 }]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/inline-table/key-dotted-01.json 0000664 0000000 0000000 00000000731 15130702260 0032376 0 ustar 00root root 0000000 0000000 {
"a": {
"a": {
"b": {"type": "integer", "value": "1"}
}
},
"b": {
"a": {
"b": {"type": "integer", "value": "1"}
}
},
"c": {
"a": {
"b": {"type": "integer", "value": "1"}
}
},
"d": {
"a": {
"b": {"type": "integer", "value": "1"}
}
},
"e": {
"a": {
"b": {"type": "integer", "value": "1"}
}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/inline-table/key-dotted-01.toml 0000664 0000000 0000000 00000000170 15130702260 0032375 0 ustar 00root root 0000000 0000000 a = { a.b = 1 }
b = { "a"."b" = 1 }
c = { a . b = 1 }
d = { 'a' . "b" = 1 }
e = {a.b=1}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/inline-table/key-dotted-02.json 0000664 0000000 0000000 00000001022 15130702260 0032371 0 ustar 00root root 0000000 0000000 {
"many": {
"dots": {
"here": {
"dot": {
"dot": {
"dot": {
"a": {
"b": {
"c": {"type": "integer", "value": "1"},
"d": {"type": "integer", "value": "2"}
}
}
}
}
}
}
}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/inline-table/key-dotted-02.toml 0000664 0000000 0000000 00000000064 15130702260 0032400 0 ustar 00root root 0000000 0000000 many.dots.here.dot.dot.dot = {a.b.c = 1, a.b.d = 2}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/inline-table/key-dotted-03.json 0000664 0000000 0000000 00000000773 15130702260 0032406 0 ustar 00root root 0000000 0000000 {
"tbl": {
"a": {
"b": {
"c": {
"d": {
"e": {"type": "integer", "value": "1"}
}
}
}
},
"x": {
"a": {
"b": {
"c": {
"d": {
"e": {"type": "integer", "value": "1"}
}
}
}
}
}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/inline-table/key-dotted-03.toml 0000664 0000000 0000000 00000000057 15130702260 0032403 0 ustar 00root root 0000000 0000000 [tbl]
a.b.c = {d.e=1}
[tbl.x]
a.b.c = {d.e=1}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/inline-table/key-dotted-04.json 0000664 0000000 0000000 00000001126 15130702260 0032400 0 ustar 00root root 0000000 0000000 {
"arr": [
{
"T": {
"a": {
"b": {"type": "integer", "value": "1"}
}
},
"t": {
"a": {
"b": {"type": "integer", "value": "1"}
}
}
},
{
"T": {
"a": {
"b": {"type": "integer", "value": "2"}
}
},
"t": {
"a": {
"b": {"type": "integer", "value": "2"}
}
}
}
]
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/inline-table/key-dotted-04.toml 0000664 0000000 0000000 00000000101 15130702260 0032372 0 ustar 00root root 0000000 0000000 [[arr]]
t = {a.b=1}
T = {a.b=1}
[[arr]]
t = {a.b=2}
T = {a.b=2}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/inline-table/key-dotted-05.json 0000664 0000000 0000000 00000001437 15130702260 0032406 0 ustar 00root root 0000000 0000000 {
"arr-1": [{
"a": {
"b": {"type": "integer", "value": "1"}
}
}],
"arr-2": [
{"type": "string", "value": "str"},
{
"a": {
"b": {"type": "integer", "value": "1"}
}
}
],
"arr-3": [
{
"a": {
"b": {"type": "integer", "value": "1"}
}
},
{
"a": {
"b": {"type": "integer", "value": "2"}
}
}
],
"arr-4": [
{"type": "string", "value": "str"},
{
"a": {
"b": {"type": "integer", "value": "1"}
}
},
{
"a": {
"b": {"type": "integer", "value": "2"}
}
}
]
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/inline-table/key-dotted-05.toml 0000664 0000000 0000000 00000000165 15130702260 0032405 0 ustar 00root root 0000000 0000000 arr-1 = [{a.b = 1}]
arr-2 = ["str", {a.b = 1}]
arr-3 = [{a.b = 1}, {a.b = 2}]
arr-4 = ["str", {a.b = 1}, {a.b = 2}]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/inline-table/key-dotted-06.json 0000664 0000000 0000000 00000001004 15130702260 0032375 0 ustar 00root root 0000000 0000000 {
"top": {
"dot": {
"dot": [
{
"dot": {
"dot": {
"dot": {"type": "integer", "value": "1"}
}
}
},
{
"dot": {
"dot": {
"dot": {"type": "integer", "value": "2"}
}
}
}
]
}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/inline-table/key-dotted-06.toml 0000664 0000000 0000000 00000000072 15130702260 0032403 0 ustar 00root root 0000000 0000000 top.dot.dot = [
{dot.dot.dot = 1},
{dot.dot.dot = 2},
]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/inline-table/key-dotted-07.json 0000664 0000000 0000000 00000000223 15130702260 0032400 0 ustar 00root root 0000000 0000000 {
"arr": [{
"a": {"b": [{
"c": {
"d": {"type": "integer", "value": "1"}
}
}]}
}]
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/inline-table/key-dotted-07.toml 0000664 0000000 0000000 00000000037 15130702260 0032405 0 ustar 00root root 0000000 0000000 arr = [
{a.b = [{c.d = 1}]}
]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/inline-table/multiline.json 0000664 0000000 0000000 00000000374 15130702260 0032114 0 ustar 00root root 0000000 0000000 {
"tbl_multiline": {
"a": {"type": "integer", "value": "1"},
"b": {"type": "string", "value": "multiline\n"},
"c": {"type": "string", "value": "and yet\nanother line"},
"d": {"type": "integer", "value": "4"}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/inline-table/multiline.toml 0000664 0000000 0000000 00000000130 15130702260 0032104 0 ustar 00root root 0000000 0000000 tbl_multiline = { a = 1, b = """
multiline
""", c = """and yet
another line""", d = 4 }
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/inline-table/nest.json 0000664 0000000 0000000 00000001250 15130702260 0031055 0 ustar 00root root 0000000 0000000 {
"arr_arr_tbl_empty": [[{}]],
"arr_arr_tbl_val": [[{
"one": {"type": "integer", "value": "1"}
}]],
"arr_arr_tbls": [[
{
"one": {"type": "integer", "value": "1"}
},
{
"two": {"type": "integer", "value": "2"}
}
]],
"arr_tbl_tbl": [{
"tbl": {
"one": {"type": "integer", "value": "1"}
}
}],
"tbl_arr_tbl": {"arr_tbl": [{
"one": {"type": "integer", "value": "1"}
}]},
"tbl_tbl_empty": {
"tbl_0": {}
},
"tbl_tbl_val": {
"tbl_1": {
"one": {"type": "integer", "value": "1"}
}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/inline-table/nest.toml 0000664 0000000 0000000 00000000564 15130702260 0031066 0 ustar 00root root 0000000 0000000 tbl_tbl_empty = { tbl_0 = {} }
tbl_tbl_val = { tbl_1 = { one = 1 } }
tbl_arr_tbl = { arr_tbl = [ { one = 1 } ] }
arr_tbl_tbl = [ { tbl = { one = 1 } } ]
# Array-of-array-of-table is interesting because it can only
# be represented in inline form.
arr_arr_tbl_empty = [ [ {} ] ]
arr_arr_tbl_val = [ [ { one = 1 } ] ]
arr_arr_tbls = [ [ { one = 1 }, { two = 2 } ] ]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/inline-table/newline-comment.json 0000664 0000000 0000000 00000001150 15130702260 0033204 0 ustar 00root root 0000000 0000000 {
"tbl-1": {
"1": {"type": "integer", "value": "2"},
"hello": {"type": "string", "value": "world"},
"arr": [
{"type": "integer", "value": "1"},
{"type": "integer", "value": "2"},
{"type": "integer", "value": "3"}
],
"tbl": {
"k": {"type": "integer", "value": "1"}
}
},
"tbl-2": {
"k": {"type": "string", "value": "\tHello\n\t"}
},
"trailing-comma-1": {
"c": {"type": "integer", "value": "1"}
},
"trailing-comma-2": {
"c": {"type": "integer", "value": "1"}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/inline-table/newline-comment.toml 0000664 0000000 0000000 00000000715 15130702260 0033214 0 ustar 00root root 0000000 0000000 # Identical to newline.toml, but with comments that shouldn't affect the
# results.
trailing-comma-1 = {#comment
# comment
c = 1,#comment
#comment
}#comment
trailing-comma-2 = { c = 1, }#comment
tbl-1 = {#comment
hello = "world",#comment
1 = 2,#comment
arr = [1,#comment
2,#comment
3,#comment
],#comment
tbl = {#comment
k = 1,#comment
}#comment
}#comment
tbl-2 = {#comment
k = """
Hello
"""#comment
}#comment
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/inline-table/newline.json 0000664 0000000 0000000 00000001601 15130702260 0031545 0 ustar 00root root 0000000 0000000 {
"no-newline-before-brace": {
"a": {"type": "integer", "value": "1"},
"b": {"type": "integer", "value": "2"}
},
"no-newline-before-brace-with-comma": {
"a": {"type": "integer", "value": "1"},
"b": {"type": "integer", "value": "2"}
},
"tbl-1": {
"1": {"type": "integer", "value": "2"},
"hello": {"type": "string", "value": "world"},
"arr": [
{"type": "integer", "value": "1"},
{"type": "integer", "value": "2"},
{"type": "integer", "value": "3"}
],
"tbl": {
"k": {"type": "integer", "value": "1"}
}
},
"tbl-2": {
"k": {"type": "string", "value": "\tHello\n\t"}
},
"trailing-comma-1": {
"c": {"type": "integer", "value": "1"}
},
"trailing-comma-2": {
"c": {"type": "integer", "value": "1"}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/inline-table/newline.toml 0000664 0000000 0000000 00000000571 15130702260 0031554 0 ustar 00root root 0000000 0000000 # TOML 1.1 supports newlines in inline tables and trailing commas.
trailing-comma-1 = {
c = 1,
}
trailing-comma-2 = { c = 1, }
tbl-1 = {
hello = "world",
1 = 2,
arr = [1,
2,
3,
],
tbl = {
k = 1,
}
}
tbl-2 = {
k = """
Hello
"""
}
no-newline-before-brace = {
a = 1,
b = 2}
no-newline-before-brace-with-comma = {
a = 1,
b = 2,}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/inline-table/spaces.json 0000664 0000000 0000000 00000001167 15130702260 0031371 0 ustar 00root root 0000000 0000000 {
"clap-1": {
"version": {"type": "string", "value": "4"},
"features": [
{"type": "string", "value": "derive"},
{"type": "string", "value": "cargo"}
]
},
"clap-2": {
"version": {"type": "string", "value": "4"},
"features": [
{"type": "string", "value": "derive"},
{"type": "string", "value": "cargo"}
],
"nest": {
"a": {"type": "string", "value": "x"},
"b": [
{"type": "float", "value": "1.5"},
{"type": "float", "value": "9"}
]
}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/inline-table/spaces.toml 0000664 0000000 0000000 00000000452 15130702260 0031367 0 ustar 00root root 0000000 0000000 # https://github.com/toml-lang/toml-test/issues/146
clap-1 = { version = "4" , features = ["derive", "cargo"] }
# Contains some literal tabs!
clap-2 = { version = "4" , features = [ "derive" , "cargo" ] , nest = { "a" = 'x' , 'b' = [ 1.5 , 9.0 ] } }
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/integer/ 0000775 0000000 0000000 00000000000 15130702260 0026305 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/integer/float64-max.json 0000664 0000000 0000000 00000000206 15130702260 0031240 0 ustar 00root root 0000000 0000000 {
"max_int": {"type": "integer", "value": "9007199254740991"},
"min_int": {"type": "integer", "value": "-9007199254740991"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/integer/float64-max.toml 0000664 0000000 0000000 00000000227 15130702260 0031245 0 ustar 00root root 0000000 0000000 # Maximum and minimum safe float64 natural numbers. Mainly here for
# -int-as-float.
max_int = 9_007_199_254_740_991
min_int = -9_007_199_254_740_991
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/integer/integer.json 0000664 0000000 0000000 00000000327 15130702260 0030637 0 ustar 00root root 0000000 0000000 {
"answer": {"type": "integer", "value": "42"},
"neganswer": {"type": "integer", "value": "-42"},
"posanswer": {"type": "integer", "value": "42"},
"zero": {"type": "integer", "value": "0"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/integer/integer.toml 0000664 0000000 0000000 00000000065 15130702260 0030640 0 ustar 00root root 0000000 0000000 answer = 42
posanswer = +42
neganswer = -42
zero = 0
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/integer/literals.json 0000664 0000000 0000000 00000000723 15130702260 0031021 0 ustar 00root root 0000000 0000000 {
"bin1": {"type": "integer", "value": "214"},
"bin2": {"type": "integer", "value": "5"},
"hex1": {"type": "integer", "value": "3735928559"},
"hex2": {"type": "integer", "value": "3735928559"},
"hex3": {"type": "integer", "value": "3735928559"},
"hex4": {"type": "integer", "value": "2439"},
"oct1": {"type": "integer", "value": "342391"},
"oct2": {"type": "integer", "value": "493"},
"oct3": {"type": "integer", "value": "501"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/integer/literals.toml 0000664 0000000 0000000 00000000227 15130702260 0031022 0 ustar 00root root 0000000 0000000 bin1 = 0b11010110
bin2 = 0b1_0_1
oct1 = 0o01234567
oct2 = 0o755
oct3 = 0o7_6_5
hex1 = 0xDEADBEEF
hex2 = 0xdeadbeef
hex3 = 0xdead_beef
hex4 = 0x00987
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/integer/long.json 0000664 0000000 0000000 00000000230 15130702260 0030132 0 ustar 00root root 0000000 0000000 {
"int64-max": {"type": "integer", "value": "9223372036854775807"},
"int64-max-neg": {"type": "integer", "value": "-9223372036854775808"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/integer/long.toml 0000664 0000000 0000000 00000000235 15130702260 0030141 0 ustar 00root root 0000000 0000000 # int64 "should" be supported, but is not mandatory. It's fine to skip this
# test.
int64-max = 9223372036854775807
int64-max-neg = -9223372036854775808
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/integer/underscore.json 0000664 0000000 0000000 00000000147 15130702260 0031353 0 ustar 00root root 0000000 0000000 {
"kilo": {"type": "integer", "value": "1000"},
"x": {"type": "integer", "value": "1111"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/integer/underscore.toml 0000664 0000000 0000000 00000000031 15130702260 0031345 0 ustar 00root root 0000000 0000000 kilo = 1_000
x = 1_1_1_1
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/integer/zero.json 0000664 0000000 0000000 00000001037 15130702260 0030160 0 ustar 00root root 0000000 0000000 {
"a2": {"type": "integer", "value": "0"},
"a3": {"type": "integer", "value": "0"},
"b1": {"type": "integer", "value": "0"},
"b2": {"type": "integer", "value": "0"},
"b3": {"type": "integer", "value": "0"},
"d1": {"type": "integer", "value": "0"},
"d2": {"type": "integer", "value": "0"},
"d3": {"type": "integer", "value": "0"},
"h1": {"type": "integer", "value": "0"},
"h2": {"type": "integer", "value": "0"},
"h3": {"type": "integer", "value": "0"},
"o1": {"type": "integer", "value": "0"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/integer/zero.toml 0000664 0000000 0000000 00000000172 15130702260 0030161 0 ustar 00root root 0000000 0000000 d1 = 0
d2 = +0
d3 = -0
h1 = 0x0
h2 = 0x00
h3 = 0x00000
o1 = 0o0
a2 = 0o00
a3 = 0o00000
b1 = 0b0
b2 = 0b00
b3 = 0b00000
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/ 0000775 0000000 0000000 00000000000 15130702260 0025440 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/alphanum.json 0000664 0000000 0000000 00000001131 15130702260 0030134 0 ustar 00root root 0000000 0000000 {
"000111": {"type": "string", "value": "leading"},
"10e3": {"type": "string", "value": "false float"},
"123": {"type": "string", "value": "num"},
"34-11": {"type": "integer", "value": "23"},
"alpha": {"type": "string", "value": "a"},
"one1two2": {"type": "string", "value": "mixed"},
"under_score": {"type": "string", "value": "___"},
"with-dash": {"type": "string", "value": "dashed"},
"2018_10": {
"001": {"type": "integer", "value": "1"}
},
"a-a-a": {
"_": {"type": "bool", "value": "false"}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/alphanum.toml 0000664 0000000 0000000 00000000255 15130702260 0030144 0 ustar 00root root 0000000 0000000 alpha = "a"
123 = "num"
000111 = "leading"
10e3 = "false float"
one1two2 = "mixed"
with-dash = "dashed"
under_score = "___"
34-11 = 23
[2018_10]
001 = 1
[a-a-a]
_ = false
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/case-sensitive.json 0000664 0000000 0000000 00000001036 15130702260 0031255 0 ustar 00root root 0000000 0000000 {
"sectioN": {"type": "string", "value": "NN"},
"Section": {
"M": {"type": "string", "value": "latin letter M"},
"name": {"type": "string", "value": "different section!!"},
"Μ": {"type": "string", "value": "greek capital letter MU"},
"μ": {"type": "string", "value": "greek small letter mu"}
},
"section": {
"NAME": {"type": "string", "value": "upper"},
"Name": {"type": "string", "value": "capitalized"},
"name": {"type": "string", "value": "lower"}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/case-sensitive.toml 0000664 0000000 0000000 00000000313 15130702260 0031254 0 ustar 00root root 0000000 0000000 sectioN = "NN"
[section]
name = "lower"
NAME = "upper"
Name = "capitalized"
[Section]
name = "different section!!"
"μ" = "greek small letter mu"
"Μ" = "greek capital letter MU"
M = "latin letter M"
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/dotted-01.json 0000664 0000000 0000000 00000000502 15130702260 0030031 0 ustar 00root root 0000000 0000000 {
"many": {
"dots": {
"dot": {
"dot": {
"dot": {"type": "integer", "value": "42"}
}
}
}
},
"name": {
"first": {"type": "string", "value": "Arthur"},
"last": {"type": "string", "value": "Dent"}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/dotted-01.toml 0000664 0000000 0000000 00000000111 15130702260 0030027 0 ustar 00root root 0000000 0000000 name.first = "Arthur"
"name".'last' = "Dent"
many.dots.dot.dot.dot = 42
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/dotted-02.json 0000664 0000000 0000000 00000001133 15130702260 0030033 0 ustar 00root root 0000000 0000000 {
"count": {
"a": {"type": "integer", "value": "1"},
"b": {"type": "integer", "value": "2"},
"c": {"type": "integer", "value": "3"},
"d": {"type": "integer", "value": "4"},
"e": {"type": "integer", "value": "5"},
"f": {"type": "integer", "value": "6"},
"g": {"type": "integer", "value": "7"},
"h": {"type": "integer", "value": "8"},
"i": {"type": "integer", "value": "9"},
"j": {"type": "integer", "value": "10"},
"k": {"type": "integer", "value": "11"},
"l": {"type": "integer", "value": "12"}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/dotted-02.toml 0000664 0000000 0000000 00000000504 15130702260 0030036 0 ustar 00root root 0000000 0000000 # Note: this file contains literal tab characters.
# Space are ignored, and key parts can be quoted.
count.a = 1
count . b = 2
"count"."c" = 3
"count" . "d" = 4
'count'.'e' = 5
'count' . 'f' = 6
"count".'g' = 7
"count" . 'h' = 8
count.'i' = 9
count . 'j' = 10
"count".k = 11
"count" . l = 12
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/dotted-03.json 0000664 0000000 0000000 00000000734 15130702260 0030042 0 ustar 00root root 0000000 0000000 {
"a": {
"few": {
"dots": {
"polka": {
"dance-with": {"type": "string", "value": "Dot"},
"dot": {"type": "string", "value": "again?"}
}
}
}
},
"tbl": {
"a": {
"b": {
"c": {"type": "float", "value": "42.666"}
}
}
},
"top": {
"key": {"type": "integer", "value": "1"}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/dotted-03.toml 0000664 0000000 0000000 00000000137 15130702260 0030041 0 ustar 00root root 0000000 0000000 top.key = 1
[tbl]
a.b.c = 42.666
[a.few.dots]
polka.dot = "again?"
polka.dance-with = "Dot"
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/dotted-04.json 0000664 0000000 0000000 00000001007 15130702260 0030035 0 ustar 00root root 0000000 0000000 {
"arr": [
{
"a": {
"b": {
"c": {"type": "integer", "value": "1"},
"d": {"type": "integer", "value": "2"}
}
}
},
{
"a": {
"b": {
"c": {"type": "integer", "value": "3"},
"d": {"type": "integer", "value": "4"}
}
}
}
],
"top": {
"key": {"type": "integer", "value": "1"}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/dotted-04.toml 0000664 0000000 0000000 00000000077 15130702260 0030045 0 ustar 00root root 0000000 0000000 top.key = 1
[[arr]]
a.b.c=1
a.b.d=2
[[arr]]
a.b.c=3
a.b.d=4
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/dotted-empty.json 0000664 0000000 0000000 00000000362 15130702260 0030753 0 ustar 00root root 0000000 0000000 {
"": {
"x": {"type": "string", "value": "empty.x"}
},
"a": {
"": {
"": {"type": "string", "value": "empty.empty"}
}
},
"x": {
"": {"type": "string", "value": "x.empty"}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/dotted-empty.toml 0000664 0000000 0000000 00000000074 15130702260 0030755 0 ustar 00root root 0000000 0000000 ''.x = "empty.x"
x."" = "x.empty"
[a]
"".'' = "empty.empty"
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/empty-01.json 0000664 0000000 0000000 00000000061 15130702260 0027704 0 ustar 00root root 0000000 0000000 {
"": {"type": "string", "value": "blank"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/empty-01.toml 0000664 0000000 0000000 00000000015 15130702260 0027705 0 ustar 00root root 0000000 0000000 "" = "blank"
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/empty-02.json 0000664 0000000 0000000 00000000061 15130702260 0027705 0 ustar 00root root 0000000 0000000 {
"": {"type": "string", "value": "blank"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/empty-02.toml 0000664 0000000 0000000 00000000015 15130702260 0027706 0 ustar 00root root 0000000 0000000 '' = "blank"
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/empty-03.json 0000664 0000000 0000000 00000000056 15130702260 0027712 0 ustar 00root root 0000000 0000000 {
"": {"type": "integer", "value": "0"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/empty-03.toml 0000664 0000000 0000000 00000000005 15130702260 0027706 0 ustar 00root root 0000000 0000000 ''=0
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/equals-nospace.json 0000664 0000000 0000000 00000000065 15130702260 0031254 0 ustar 00root root 0000000 0000000 {
"answer": {"type": "integer", "value": "42"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/equals-nospace.toml 0000664 0000000 0000000 00000000012 15130702260 0031246 0 ustar 00root root 0000000 0000000 answer=42
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/escapes.json 0000664 0000000 0000000 00000000621 15130702260 0027755 0 ustar 00root root 0000000 0000000 {
"\b": {"type": "string", "value": "bell"},
"\n": {"type": "string", "value": "newline"},
"\"": {"type": "string", "value": "just a quote"},
"backsp\b\b": {},
"À": {"type": "string", "value": "latin capital letter A with grave"},
"\"quoted\"": {
"quote": {"type": "bool", "value": "true"}
},
"a.b": {
"À": {}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/escapes.toml 0000664 0000000 0000000 00000000243 15130702260 0027757 0 ustar 00root root 0000000 0000000 "\n" = "newline"
"\b" = "bell"
"\u00c0" = "latin capital letter A with grave"
"\"" = "just a quote"
["backsp\b\b"]
["\"quoted\""]
quote = true
["a.b"."\u00c0"]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/like-date.json 0000664 0000000 0000000 00000001662 15130702260 0030177 0 ustar 00root root 0000000 0000000 {
"15:16:17": {"type": "integer", "value": "6"},
"2001-02-03": {"type": "integer", "value": "1"},
"2001-02-04": {"type": "integer", "value": "2"},
"2001-02-05": {"type": "integer", "value": "3"},
"2001-02-06T15:16:17+01:00": {"type": "integer", "value": "4"},
"2001-02-07T15:16:17": {"type": "integer", "value": "5"},
"2002-01-04": [{
"k": {"type": "integer", "value": "12"}
}],
"2001-02-11": {
"a": {
"2001-02-12": {"type": "integer", "value": "9"}
}
},
"2002-01-02": {
"k": {"type": "integer", "value": "10"},
"2024-01-03": {
"k": {"type": "integer", "value": "11"}
}
},
"a": {
"2001-02-08": {"type": "integer", "value": "7"},
"2001-02-09": {
"2001-02-10": {"type": "integer", "value": "8"}
}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/like-date.toml 0000664 0000000 0000000 00000000771 15130702260 0030201 0 ustar 00root root 0000000 0000000 # '-' is a valid character in keys: make a key that looks like a date.
2001-02-03 = 1
"2001-02-04" = 2
'2001-02-05' = 3
# Also include datetime and time for good measure; these need to be quoted as
# ':' isn't a valid bare key.
"2001-02-06T15:16:17+01:00" = 4
"2001-02-07T15:16:17" = 5
"15:16:17" = 6
# Dotted keys
a.2001-02-08 = 7
a.2001-02-09.2001-02-10 = 8
2001-02-11.a.2001-02-12 = 9
# Table names
[2002-01-02]
k = 10
[2002-01-02.2024-01-03]
k = 11
[[2002-01-04]]
k = 12
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/numeric-01.json 0000664 0000000 0000000 00000000057 15130702260 0030215 0 ustar 00root root 0000000 0000000 {
"1": {"type": "bool", "value": "true"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/numeric-01.toml 0000664 0000000 0000000 00000000015 15130702260 0030211 0 ustar 00root root 0000000 0000000 1 = true
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/numeric-02.json 0000664 0000000 0000000 00000000104 15130702260 0030207 0 ustar 00root root 0000000 0000000 {
"1": {
"2": {"type": "bool", "value": "true"}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/numeric-02.toml 0000664 0000000 0000000 00000000015 15130702260 0030212 0 ustar 00root root 0000000 0000000 1.2 = true
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/numeric-03.json 0000664 0000000 0000000 00000000062 15130702260 0030213 0 ustar 00root root 0000000 0000000 {
"0123": {"type": "bool", "value": "true"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/numeric-03.toml 0000664 0000000 0000000 00000000015 15130702260 0030213 0 ustar 00root root 0000000 0000000 0123 = true
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/numeric-04.json 0000664 0000000 0000000 00000000106 15130702260 0030213 0 ustar 00root root 0000000 0000000 {
"01": {
"23": {"type": "bool", "value": "true"}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/numeric-04.toml 0000664 0000000 0000000 00000000015 15130702260 0030214 0 ustar 00root root 0000000 0000000 01.23 = true
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/numeric-05.json 0000664 0000000 0000000 00000000106 15130702260 0030214 0 ustar 00root root 0000000 0000000 {
"23": {
"01": {"type": "bool", "value": "true"}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/numeric-05.toml 0000664 0000000 0000000 00000000015 15130702260 0030215 0 ustar 00root root 0000000 0000000 23.01 = true
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/numeric-06.json 0000664 0000000 0000000 00000000060 15130702260 0030214 0 ustar 00root root 0000000 0000000 {
"-1": {"type": "bool", "value": "true"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/numeric-06.toml 0000664 0000000 0000000 00000000015 15130702260 0030216 0 ustar 00root root 0000000 0000000 -1 = true
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/numeric-07.json 0000664 0000000 0000000 00000000061 15130702260 0030216 0 ustar 00root root 0000000 0000000 {
"-01": {"type": "bool", "value": "true"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/numeric-07.toml 0000664 0000000 0000000 00000000015 15130702260 0030217 0 ustar 00root root 0000000 0000000 -01 = true
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/numeric-08.json 0000664 0000000 0000000 00000000144 15130702260 0030221 0 ustar 00root root 0000000 0000000 {
"01": {"type": "string", "value": "zero one"},
"1": {"type": "string", "value": "one"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/numeric-08.toml 0000664 0000000 0000000 00000000033 15130702260 0030220 0 ustar 00root root 0000000 0000000 1 = 'one'
01 = 'zero one'
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/quoted-dots.json 0000664 0000000 0000000 00000000746 15130702260 0030612 0 ustar 00root root 0000000 0000000 {
"plain": {"type": "integer", "value": "1"},
"with.dot": {"type": "integer", "value": "2"},
"plain_table": {
"plain": {"type": "integer", "value": "3"},
"with.dot": {"type": "integer", "value": "4"}
},
"table": {
"withdot": {
"escaped.dot": {"type": "integer", "value": "7"},
"key.with.dots": {"type": "integer", "value": "6"},
"plain": {"type": "integer", "value": "5"}
}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/quoted-dots.toml 0000664 0000000 0000000 00000000207 15130702260 0030604 0 ustar 00root root 0000000 0000000 plain = 1
"with.dot" = 2
[plain_table]
plain = 3
"with.dot" = 4
[table.withdot]
plain = 5
"key.with.dots" = 6
"escaped\u002edot" = 7
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/quoted-unicode.json 0000664 0000000 0000000 00000000625 15130702260 0031263 0 ustar 00root root 0000000 0000000 {
"\u0000": {"type": "string", "value": "null"},
"\b \f A ÿ 𐀀 ": {"type": "string", "value": "escaped key"},
"\\u0000": {"type": "string", "value": "different key"},
"l ~ ÿ 𐀀 ": {"type": "string", "value": "literal key"},
"~ ÿ 𐀀 ": {"type": "string", "value": "basic key"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/quoted-unicode.toml 0000664 0000000 0000000 00000000372 15130702260 0031264 0 ustar 00root root 0000000 0000000
"\u0000" = "null"
'\u0000' = "different key"
"\u0008 \u000c \U00000041 \u007f \u0080 \u00ff \ud7ff \ue000 \uffff \U00010000 \U0010ffff" = "escaped key"
"~ ÿ 𐀀 " = "basic key"
'l ~ ÿ 𐀀 ' = "literal key"
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/space.json 0000664 0000000 0000000 00000000474 15130702260 0027433 0 ustar 00root root 0000000 0000000 {
" much \t\t whitespace \t\n \r\n ": {"type": "integer", "value": "3"},
" c d ": {"type": "integer", "value": "2"},
"a b": {"type": "integer", "value": "1"},
" tbl ": {
"\ttab\ttab\t": {"type": "string", "value": "tab"}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/space.toml 0000664 0000000 0000000 00000000234 15130702260 0027427 0 ustar 00root root 0000000 0000000 # Keep whitespace inside quotes keys at all positions.
"a b" = 1
" c d " = 2
" much whitespace \n \r\n " = 3
[ " tbl " ]
"\ttab\ttab\t" = "tab"
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/special-chars.json 0000664 0000000 0000000 00000000142 15130702260 0031046 0 ustar 00root root 0000000 0000000 {
"=~!@$^\u0026*()_+-`1234567890[]|/?\u003e\u003c.,;:'=": {"type": "integer", "value": "1"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/special-chars.toml 0000664 0000000 0000000 00000000054 15130702260 0031052 0 ustar 00root root 0000000 0000000 "=~!@$^&*()_+-`1234567890[]|/?><.,;:'=" = 1
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/special-word.json 0000664 0000000 0000000 00000000342 15130702260 0030723 0 ustar 00root root 0000000 0000000 {
"false": {"type": "bool", "value": "false"},
"inf": {"type": "integer", "value": "100000000"},
"nan": {"type": "string", "value": "ceci n'est pas un nombre"},
"true": {"type": "integer", "value": "1"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/special-word.toml 0000664 0000000 0000000 00000000111 15130702260 0030717 0 ustar 00root root 0000000 0000000 false = false
true = 1
inf = 100000000
nan = "ceci n'est pas un nombre"
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/start.json 0000664 0000000 0000000 00000001500 15130702260 0027464 0 ustar 00root root 0000000 0000000 {
"-": {
"-": {"type": "integer", "value": "4"}
},
"---": {
"---": {"type": "integer", "value": "7"}
},
"-key": {
"-key": {"type": "integer", "value": "1"}
},
"1": {
"1": {"type": "integer", "value": "6"}
},
"111": {
"111": {"type": "integer", "value": "9"}
},
"1key": {
"1key": {"type": "integer", "value": "3"}
},
"_": {
"_": {"type": "integer", "value": "5"}
},
"___": {
"___": {"type": "integer", "value": "8"}
},
"_key": {
"_key": {"type": "integer", "value": "2"}
},
"inline": {
"---": {
"---": {"type": "integer", "value": "10"},
"111": {"type": "integer", "value": "12"},
"___": {"type": "integer", "value": "11"}
}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/start.toml 0000664 0000000 0000000 00000000432 15130702260 0027471 0 ustar 00root root 0000000 0000000 # Table and keys can start with any character; there is no requirement for it to
# start with a letter.
[-key]
-key = 1
[_key]
_key = 2
[1key]
1key = 3
[-]
- = 4
[_]
_ = 5
[1]
1 = 6
[---]
--- = 7
[___]
___ = 8
[111]
111 = 9
[inline]
--- = {--- = 10, ___ = 11, 111 = 12}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/zero.json 0000664 0000000 0000000 00000000057 15130702260 0027314 0 ustar 00root root 0000000 0000000 {
"0": {"type": "integer", "value": "0"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/key/zero.toml 0000664 0000000 0000000 00000000004 15130702260 0027306 0 ustar 00root root 0000000 0000000 0=0
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/multibyte.json 0000664 0000000 0000000 00000002040 15130702260 0027555 0 ustar 00root root 0000000 0000000 {
"𝐭𝐛𝐥": {
"string": {"type": "string", "value": "𝓼𝓽𝓻𝓲𝓷𝓰 - #"},
"sub": {
"another_test_string": {"type": "string", "value": "§á₥è ƭλïñϱ, βúƭ ωïƭλ á ƨƭřïñϱ #"},
"escapes": {"type": "string", "value": " Âñδ ωλèñ \"'ƨ ářè ïñ ƭλè ƨƭřïñϱ, áℓôñϱ ωïƭλ # \""},
"βïƭ#": {
"multi_line_array": [{"type": "string", "value": "]"}],
"ωλáƭ?": {"type": "string", "value": "Ýôú δôñ'ƭ ƭλïñƙ ƨô₥è úƨèř ωôñ'ƭ δô ƭλáƭ?"}
},
"𝕒𝕣𝕣𝕒𝕪": [
{"type": "string", "value": "] "},
{"type": "string", "value": " # "}
],
"𝕒𝕣𝕣𝕒𝕪𝟚": [
{"type": "string", "value": "Tèƨƭ #11 ]ƥřôƲèδ ƭλáƭ"},
{"type": "string", "value": "Éжƥèřï₥èñƭ #9 ωáƨ á ƨúççèƨƨ"}
]
}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/multibyte.toml 0000664 0000000 0000000 00000002204 15130702260 0027561 0 ustar 00root root 0000000 0000000 # Test multibyte throughout
# Tèƨƭ ƒïℓè ƒôř TÓM£
# Óñℓ¥ ƭλïƨ ôñè ƭřïèƨ ƭô è₥úℓáƭè á TÓM£ ƒïℓè ωřïƭƭèñ β¥ á úƨèř ôƒ ƭλè ƙïñδ ôƒ ƥářƨèř ωřïƭèřƨ ƥřôβáβℓ¥ λáƭè
['𝐭𝐛𝐥']
string = "𝓼𝓽𝓻𝓲𝓷𝓰 - #" # " 𝓼𝓽𝓻𝓲𝓷𝓰
['𝐭𝐛𝐥'.sub]
'𝕒𝕣𝕣𝕒𝕪' = [ "] ", " # "] # ] 𝓪𝓻𝓻𝓪𝔂
'𝕒𝕣𝕣𝕒𝕪𝟚' = [ "Tèƨƭ #11 ]ƥřôƲèδ ƭλáƭ", "Éжƥèřï₥èñƭ #9 ωáƨ á ƨúççèƨƨ" ]
# Ýôú δïδñ'ƭ ƭλïñƙ ïƭ'δ áƨ èáƨ¥ áƨ çλúçƙïñϱ ôúƭ ƭλè ℓáƨƭ #, δïδ ¥ôú?
another_test_string = "§á₥è ƭλïñϱ, βúƭ ωïƭλ á ƨƭřïñϱ #"
escapes = " Âñδ ωλèñ \"'ƨ ářè ïñ ƭλè ƨƭřïñϱ, áℓôñϱ ωïƭλ # \"" # "áñδ çô₥₥èñƭƨ ářè ƭλèřè ƭôô"
# Tλïñϱƨ ωïℓℓ ϱèƭ λářδèř
['𝐭𝐛𝐥'.sub."βïƭ#"]
"ωλáƭ?" = "Ýôú δôñ'ƭ ƭλïñƙ ƨô₥è úƨèř ωôñ'ƭ δô ƭλáƭ?"
multi_line_array = [
"]",
# ] Óλ ¥èƨ Ì δïδ
]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/newline-crlf.json 0000664 0000000 0000000 00000000152 15130702260 0030126 0 ustar 00root root 0000000 0000000 {
"newline": {"type": "string", "value": "crlf"},
"os": {"type": "string", "value": "DOS"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/newline-crlf.toml 0000664 0000000 0000000 00000000036 15130702260 0030131 0 ustar 00root root 0000000 0000000 os = "DOS"
newline = "crlf"
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/newline-lf.json 0000664 0000000 0000000 00000000151 15130702260 0027600 0 ustar 00root root 0000000 0000000 {
"newline": {"type": "string", "value": "lf"},
"os": {"type": "string", "value": "unix"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/newline-lf.toml 0000664 0000000 0000000 00000000033 15130702260 0027601 0 ustar 00root root 0000000 0000000 os = "unix"
newline = "lf"
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/ 0000775 0000000 0000000 00000000000 15130702260 0026235 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-0.json 0000664 0000000 0000000 00000000177 15130702260 0030562 0 ustar 00root root 0000000 0000000 {
"another": {"type": "string", "value": "# This is not a comment"},
"key": {"type": "string", "value": "value"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-0.toml 0000664 0000000 0000000 00000000172 15130702260 0030557 0 ustar 00root root 0000000 0000000 # This is a full-line comment
key = "value" # This is a comment at the end of a line
another = "# This is not a comment"
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-1.json 0000664 0000000 0000000 00000000064 15130702260 0030556 0 ustar 00root root 0000000 0000000 {
"key": {"type": "string", "value": "value"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-1.toml 0000664 0000000 0000000 00000000016 15130702260 0030555 0 ustar 00root root 0000000 0000000 key = "value"
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-10.json 0000664 0000000 0000000 00000000566 15130702260 0030645 0 ustar 00root root 0000000 0000000 {
"apple": {
"color": {"type": "string", "value": "red"},
"skin": {"type": "string", "value": "thin"},
"type": {"type": "string", "value": "fruit"}
},
"orange": {
"color": {"type": "string", "value": "orange"},
"skin": {"type": "string", "value": "thick"},
"type": {"type": "string", "value": "fruit"}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-10.toml 0000664 0000000 0000000 00000000221 15130702260 0030633 0 ustar 00root root 0000000 0000000 # RECOMMENDED
apple.type = "fruit"
apple.skin = "thin"
apple.color = "red"
orange.type = "fruit"
orange.skin = "thick"
orange.color = "orange"
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-11.json 0000664 0000000 0000000 00000000110 15130702260 0030627 0 ustar 00root root 0000000 0000000 {
"3": {
"14159": {"type": "string", "value": "pi"}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-11.toml 0000664 0000000 0000000 00000000017 15130702260 0030637 0 ustar 00root root 0000000 0000000 3.14159 = "pi"
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-12.json 0000664 0000000 0000000 00000000155 15130702260 0030641 0 ustar 00root root 0000000 0000000 {
"str": {"type": "string", "value": "I'm a string. \"You can quote me\". Name\tJosé\nLocation\tSF."}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-12.toml 0000664 0000000 0000000 00000000111 15130702260 0030633 0 ustar 00root root 0000000 0000000 str = "I'm a string. \"You can quote me\". Name\tJos\xE9\nLocation\tSF."
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-13.json 0000664 0000000 0000000 00000000117 15130702260 0030640 0 ustar 00root root 0000000 0000000 {
"str1": {"type": "string", "value": "Roses are red\nViolets are blue"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-13.toml 0000664 0000000 0000000 00000000055 15130702260 0030643 0 ustar 00root root 0000000 0000000 str1 = """
Roses are red
Violets are blue"""
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-14.json 0000664 0000000 0000000 00000000235 15130702260 0030642 0 ustar 00root root 0000000 0000000 {
"str2": {"type": "string", "value": "Roses are red\nViolets are blue"},
"str3": {"type": "string", "value": "Roses are red\r\nViolets are blue"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-14.toml 0000664 0000000 0000000 00000000343 15130702260 0030644 0 ustar 00root root 0000000 0000000 # On a Unix system, the above multi-line string will most likely be the same as:
str2 = "Roses are red\nViolets are blue"
# On a Windows system, it will most likely be equivalent to:
str3 = "Roses are red\r\nViolets are blue"
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-15.json 0000664 0000000 0000000 00000000416 15130702260 0030644 0 ustar 00root root 0000000 0000000 {
"str1": {"type": "string", "value": "The quick brown fox jumps over the lazy dog."},
"str2": {"type": "string", "value": "The quick brown fox jumps over the lazy dog."},
"str3": {"type": "string", "value": "The quick brown fox jumps over the lazy dog."}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-15.toml 0000664 0000000 0000000 00000000423 15130702260 0030644 0 ustar 00root root 0000000 0000000 # The following strings are byte-for-byte equivalent:
str1 = "The quick brown fox jumps over the lazy dog."
str2 = """
The quick brown \
fox jumps over \
the lazy dog."""
str3 = """\
The quick brown \
fox jumps over \
the lazy dog.\
"""
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-16.json 0000664 0000000 0000000 00000000607 15130702260 0030647 0 ustar 00root root 0000000 0000000 {
"str4": {"type": "string", "value": "Here are two quotation marks: \"\". Simple enough."},
"str5": {"type": "string", "value": "Here are three quotation marks: \"\"\"."},
"str6": {"type": "string", "value": "Here are fifteen quotation marks: \"\"\"\"\"\"\"\"\"\"\"\"\"\"\"."},
"str7": {"type": "string", "value": "\"This,\" she said, \"is just a pointless statement.\""}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-16.toml 0000664 0000000 0000000 00000000553 15130702260 0030651 0 ustar 00root root 0000000 0000000 str4 = """Here are two quotation marks: "". Simple enough."""
# str5 = """Here are three quotation marks: """.""" # INVALID
str5 = """Here are three quotation marks: ""\"."""
str6 = """Here are fifteen quotation marks: ""\"""\"""\"""\"""\"."""
# "This," she said, "is just a pointless statement."
str7 = """"This," she said, "is just a pointless statement.""""
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-17.json 0000664 0000000 0000000 00000000464 15130702260 0030651 0 ustar 00root root 0000000 0000000 {
"quoted": {"type": "string", "value": "Tom \"Dubs\" Preston-Werner"},
"regex": {"type": "string", "value": "\u003c\\i\\c*\\s*\u003e"},
"winpath": {"type": "string", "value": "C:\\Users\\nodejs\\templates"},
"winpath2": {"type": "string", "value": "\\\\ServerX\\admin$\\system32\\"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-17.toml 0000664 0000000 0000000 00000000256 15130702260 0030652 0 ustar 00root root 0000000 0000000 # What you see is what you get.
winpath = 'C:\Users\nodejs\templates'
winpath2 = '\\ServerX\admin$\system32\'
quoted = 'Tom "Dubs" Preston-Werner'
regex = '<\i\c*\s*>'
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-18.json 0000664 0000000 0000000 00000000334 15130702260 0030646 0 ustar 00root root 0000000 0000000 {
"lines": {"type": "string", "value": "The first newline is\ntrimmed in literal strings.\n All other whitespace\n is preserved.\n"},
"regex2": {"type": "string", "value": "I [dw]on't need \\d{2} apples"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-18.toml 0000664 0000000 0000000 00000000227 15130702260 0030651 0 ustar 00root root 0000000 0000000 regex2 = '''I [dw]on't need \d{2} apples'''
lines = '''
The first newline is
trimmed in literal strings.
All other whitespace
is preserved.
'''
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-19.json 0000664 0000000 0000000 00000000444 15130702260 0030651 0 ustar 00root root 0000000 0000000 {
"apos15": {"type": "string", "value": "Here are fifteen apostrophes: '''''''''''''''"},
"quot15": {"type": "string", "value": "Here are fifteen quotation marks: \"\"\"\"\"\"\"\"\"\"\"\"\"\"\""},
"str": {"type": "string", "value": "'That,' she said, 'is still pointless.'"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-19.toml 0000664 0000000 0000000 00000000444 15130702260 0030653 0 ustar 00root root 0000000 0000000 quot15 = '''Here are fifteen quotation marks: """""""""""""""'''
# apos15 = '''Here are fifteen apostrophes: '''''''''''''''''' # INVALID
apos15 = "Here are fifteen apostrophes: '''''''''''''''"
# 'That,' she said, 'is still pointless.'
str = ''''That,' she said, 'is still pointless.''''
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-20.json 0000664 0000000 0000000 00000000303 15130702260 0030633 0 ustar 00root root 0000000 0000000 {
"int1": {"type": "integer", "value": "99"},
"int2": {"type": "integer", "value": "42"},
"int3": {"type": "integer", "value": "0"},
"int4": {"type": "integer", "value": "-17"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-20.toml 0000664 0000000 0000000 00000000051 15130702260 0030635 0 ustar 00root root 0000000 0000000 int1 = +99
int2 = 42
int3 = 0
int4 = -17
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-21.json 0000664 0000000 0000000 00000000322 15130702260 0030635 0 ustar 00root root 0000000 0000000 {
"int5": {"type": "integer", "value": "1000"},
"int6": {"type": "integer", "value": "5349221"},
"int7": {"type": "integer", "value": "5349221"},
"int8": {"type": "integer", "value": "12345"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-21.toml 0000664 0000000 0000000 00000000172 15130702260 0030642 0 ustar 00root root 0000000 0000000 int5 = 1_000
int6 = 5_349_221
int7 = 53_49_221 # Indian number system grouping
int8 = 1_2_3_4_5 # VALID but discouraged
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-22.json 0000664 0000000 0000000 00000000501 15130702260 0030635 0 ustar 00root root 0000000 0000000 {
"bin1": {"type": "integer", "value": "214"},
"hex1": {"type": "integer", "value": "3735928559"},
"hex2": {"type": "integer", "value": "3735928559"},
"hex3": {"type": "integer", "value": "3735928559"},
"oct1": {"type": "integer", "value": "342391"},
"oct2": {"type": "integer", "value": "493"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-22.toml 0000664 0000000 0000000 00000000337 15130702260 0030646 0 ustar 00root root 0000000 0000000 # hexadecimal with prefix `0x`
hex1 = 0xDEADBEEF
hex2 = 0xdeadbeef
hex3 = 0xdead_beef
# octal with prefix `0o`
oct1 = 0o01234567
oct2 = 0o755 # useful for Unix file permissions
# binary with prefix `0b`
bin1 = 0b11010110
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-23.json 0000664 0000000 0000000 00000000533 15130702260 0030643 0 ustar 00root root 0000000 0000000 {
"flt1": {"type": "float", "value": "1"},
"flt2": {"type": "float", "value": "3.1415"},
"flt3": {"type": "float", "value": "-0.01"},
"flt4": {"type": "float", "value": "5e+22"},
"flt5": {"type": "float", "value": "1e+06"},
"flt6": {"type": "float", "value": "-0.02"},
"flt7": {"type": "float", "value": "6.626e-34"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-23.toml 0000664 0000000 0000000 00000000177 15130702260 0030651 0 ustar 00root root 0000000 0000000 # fractional
flt1 = +1.0
flt2 = 3.1415
flt3 = -0.01
# exponent
flt4 = 5e+22
flt5 = 1e06
flt6 = -2E-2
# both
flt7 = 6.626e-34
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-24.json 0000664 0000000 0000000 00000000077 15130702260 0030647 0 ustar 00root root 0000000 0000000 {
"flt8": {"type": "float", "value": "224617.445991228"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-24.toml 0000664 0000000 0000000 00000000033 15130702260 0030641 0 ustar 00root root 0000000 0000000 flt8 = 224_617.445_991_228
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-25.json 0000664 0000000 0000000 00000000430 15130702260 0030641 0 ustar 00root root 0000000 0000000 {
"sf1": {"type": "float", "value": "inf"},
"sf2": {"type": "float", "value": "inf"},
"sf3": {"type": "float", "value": "-inf"},
"sf4": {"type": "float", "value": "nan"},
"sf5": {"type": "float", "value": "nan"},
"sf6": {"type": "float", "value": "nan"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-25.toml 0000664 0000000 0000000 00000000424 15130702260 0030646 0 ustar 00root root 0000000 0000000 # infinity
sf1 = inf # positive infinity
sf2 = +inf # positive infinity
sf3 = -inf # negative infinity
# not a number
sf4 = nan # actual sNaN/qNaN encoding is implementation-specific
sf5 = +nan # same as `nan`
sf6 = -nan # valid, actual encoding is implementation-specific
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-26.json 0000664 0000000 0000000 00000000144 15130702260 0030644 0 ustar 00root root 0000000 0000000 {
"bool1": {"type": "bool", "value": "true"},
"bool2": {"type": "bool", "value": "false"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-26.toml 0000664 0000000 0000000 00000000033 15130702260 0030643 0 ustar 00root root 0000000 0000000 bool1 = true
bool2 = false
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-27.json 0000664 0000000 0000000 00000000444 15130702260 0030650 0 ustar 00root root 0000000 0000000 {
"odt1": {"type": "datetime", "value": "1979-05-27T07:32:00Z"},
"odt2": {"type": "datetime", "value": "1979-05-27T00:32:00-07:00"},
"odt3": {"type": "datetime", "value": "1979-05-27T00:32:00.5-07:00"},
"odt4": {"type": "datetime", "value": "1979-05-27T00:32:00.999-07:00"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-27.toml 0000664 0000000 0000000 00000000205 15130702260 0030645 0 ustar 00root root 0000000 0000000 odt1 = 1979-05-27T07:32:00Z
odt2 = 1979-05-27T00:32:00-07:00
odt3 = 1979-05-27T00:32:00.5-07:00
odt4 = 1979-05-27T00:32:00.999-07:00
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-28.json 0000664 0000000 0000000 00000000106 15130702260 0030644 0 ustar 00root root 0000000 0000000 {
"odt4": {"type": "datetime", "value": "1979-05-27T07:32:00Z"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-28.toml 0000664 0000000 0000000 00000000034 15130702260 0030646 0 ustar 00root root 0000000 0000000 odt4 = 1979-05-27 07:32:00Z
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-29.json 0000664 0000000 0000000 00000000216 15130702260 0030647 0 ustar 00root root 0000000 0000000 {
"odt5": {"type": "datetime", "value": "1979-05-27T07:32:00Z"},
"odt6": {"type": "datetime", "value": "1979-05-27T07:32:00-07:00"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-29.toml 0000664 0000000 0000000 00000000067 15130702260 0030655 0 ustar 00root root 0000000 0000000 odt5 = 1979-05-27 07:32Z
odt6 = 1979-05-27 07:32-07:00
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-3.json 0000664 0000000 0000000 00000000333 15130702260 0030557 0 ustar 00root root 0000000 0000000 {
"1234": {"type": "string", "value": "value"},
"bare-key": {"type": "string", "value": "value"},
"bare_key": {"type": "string", "value": "value"},
"key": {"type": "string", "value": "value"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-3.toml 0000664 0000000 0000000 00000000103 15130702260 0030554 0 ustar 00root root 0000000 0000000 key = "value"
bare_key = "value"
bare-key = "value"
1234 = "value"
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-30.json 0000664 0000000 0000000 00000000341 15130702260 0030636 0 ustar 00root root 0000000 0000000 {
"ldt1": {"type": "datetime-local", "value": "1979-05-27T07:32:00"},
"ldt2": {"type": "datetime-local", "value": "1979-05-27T07:32:00.5"},
"ldt3": {"type": "datetime-local", "value": "1979-05-27T00:32:00.999"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-30.toml 0000664 0000000 0000000 00000000127 15130702260 0030642 0 ustar 00root root 0000000 0000000 ldt1 = 1979-05-27T07:32:00
ldt2 = 1979-05-27T07:32:00.5
ldt3 = 1979-05-27T00:32:00.999
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-31.json 0000664 0000000 0000000 00000000113 15130702260 0030634 0 ustar 00root root 0000000 0000000 {
"ldt3": {"type": "datetime-local", "value": "1979-05-27T07:32:00"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-31.toml 0000664 0000000 0000000 00000000030 15130702260 0030634 0 ustar 00root root 0000000 0000000 ldt3 = 1979-05-27T07:32
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-32.json 0000664 0000000 0000000 00000000075 15130702260 0030644 0 ustar 00root root 0000000 0000000 {
"ld1": {"type": "date-local", "value": "1979-05-27"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-32.toml 0000664 0000000 0000000 00000000021 15130702260 0030635 0 ustar 00root root 0000000 0000000 ld1 = 1979-05-27
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-33.json 0000664 0000000 0000000 00000000261 15130702260 0030642 0 ustar 00root root 0000000 0000000 {
"lt1": {"type": "time-local", "value": "07:32:00"},
"lt2": {"type": "time-local", "value": "00:32:00.5"},
"lt3": {"type": "time-local", "value": "00:32:00.999"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-33.toml 0000664 0000000 0000000 00000000063 15130702260 0030644 0 ustar 00root root 0000000 0000000 lt1 = 07:32:00
lt2 = 00:32:00.5
lt3 = 00:32:00.999
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-34.json 0000664 0000000 0000000 00000000073 15130702260 0030644 0 ustar 00root root 0000000 0000000 {
"lt3": {"type": "time-local", "value": "07:32:00"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-34.toml 0000664 0000000 0000000 00000000014 15130702260 0030641 0 ustar 00root root 0000000 0000000 lt3 = 07:32
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-35.json 0000664 0000000 0000000 00000003351 15130702260 0030647 0 ustar 00root root 0000000 0000000 {
"colors": [
{"type": "string", "value": "red"},
{"type": "string", "value": "yellow"},
{"type": "string", "value": "green"}
],
"contributors": [
{"type": "string", "value": "Foo Bar \u003cfoo@example.com\u003e"},
{
"email": {"type": "string", "value": "bazqux@example.com"},
"name": {"type": "string", "value": "Baz Qux"},
"url": {"type": "string", "value": "https://example.com/bazqux"}
}
],
"integers": [
{"type": "integer", "value": "1"},
{"type": "integer", "value": "2"},
{"type": "integer", "value": "3"}
],
"nested_arrays_of_ints": [
[
{"type": "integer", "value": "1"},
{"type": "integer", "value": "2"}
],
[
{"type": "integer", "value": "3"},
{"type": "integer", "value": "4"},
{"type": "integer", "value": "5"}
]
],
"nested_mixed_array": [
[
{"type": "integer", "value": "1"},
{"type": "integer", "value": "2"}
],
[
{"type": "string", "value": "a"},
{"type": "string", "value": "b"},
{"type": "string", "value": "c"}
]
],
"numbers": [
{"type": "float", "value": "0.1"},
{"type": "float", "value": "0.2"},
{"type": "float", "value": "0.5"},
{"type": "integer", "value": "1"},
{"type": "integer", "value": "2"},
{"type": "integer", "value": "5"}
],
"string_array": [
{"type": "string", "value": "all"},
{"type": "string", "value": "strings"},
{"type": "string", "value": "are the same"},
{"type": "string", "value": "type"}
]
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-35.toml 0000664 0000000 0000000 00000000665 15130702260 0030656 0 ustar 00root root 0000000 0000000 integers = [ 1, 2, 3 ]
colors = [ "red", "yellow", "green" ]
nested_arrays_of_ints = [ [ 1, 2 ], [3, 4, 5] ]
nested_mixed_array = [ [ 1, 2 ], ["a", "b", "c"] ]
string_array = [ "all", 'strings', """are the same""", '''type''' ]
# Mixed-type arrays are allowed
numbers = [ 0.1, 0.2, 0.5, 1, 2, 5 ]
contributors = [
"Foo Bar ",
{ name = "Baz Qux", email = "bazqux@example.com", url = "https://example.com/bazqux" }
]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-36.json 0000664 0000000 0000000 00000000414 15130702260 0030645 0 ustar 00root root 0000000 0000000 {
"integers2": [
{"type": "integer", "value": "1"},
{"type": "integer", "value": "2"},
{"type": "integer", "value": "3"}
],
"integers3": [
{"type": "integer", "value": "1"},
{"type": "integer", "value": "2"}
]
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-36.toml 0000664 0000000 0000000 00000000102 15130702260 0030641 0 ustar 00root root 0000000 0000000 integers2 = [
1, 2, 3
]
integers3 = [
1,
2, # this is ok
]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-37.json 0000664 0000000 0000000 00000000024 15130702260 0030643 0 ustar 00root root 0000000 0000000 {
"table": {}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-37.toml 0000664 0000000 0000000 00000000010 15130702260 0030640 0 ustar 00root root 0000000 0000000 [table]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-38.json 0000664 0000000 0000000 00000000426 15130702260 0030652 0 ustar 00root root 0000000 0000000 {
"table-1": {
"key1": {"type": "string", "value": "some string"},
"key2": {"type": "integer", "value": "123"}
},
"table-2": {
"key1": {"type": "string", "value": "another string"},
"key2": {"type": "integer", "value": "456"}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-38.toml 0000664 0000000 0000000 00000000130 15130702260 0030644 0 ustar 00root root 0000000 0000000 [table-1]
key1 = "some string"
key2 = 123
[table-2]
key1 = "another string"
key2 = 456
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-39.json 0000664 0000000 0000000 00000000227 15130702260 0030652 0 ustar 00root root 0000000 0000000 {
"dog": {
"tater.man": {
"type": {
"name": {"type": "string", "value": "pug"}
}
}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-39.toml 0000664 0000000 0000000 00000000044 15130702260 0030651 0 ustar 00root root 0000000 0000000 [dog."tater.man"]
type.name = "pug"
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-4.json 0000664 0000000 0000000 00000000506 15130702260 0030562 0 ustar 00root root 0000000 0000000 {
"127.0.0.1": {"type": "string", "value": "value"},
"character encoding": {"type": "string", "value": "value"},
"key2": {"type": "string", "value": "value"},
"quoted \"value\"": {"type": "string", "value": "value"},
"ʎǝʞ": {"type": "string", "value": "value"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-4.toml 0000664 0000000 0000000 00000000164 15130702260 0030564 0 ustar 00root root 0000000 0000000 "127.0.0.1" = "value"
"character encoding" = "value"
"ʎǝʞ" = "value"
'key2' = "value"
'quoted "value"' = "value"
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-40.json 0000664 0000000 0000000 00000000400 15130702260 0030633 0 ustar 00root root 0000000 0000000 {
"a": {
"b": {
"c": {}
}
},
"d": {
"e": {
"f": {}
}
},
"g": {
"h": {
"i": {}
}
},
"j": {
"ʞ": {
"l": {}
}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-40.toml 0000664 0000000 0000000 00000000240 15130702260 0030637 0 ustar 00root root 0000000 0000000 [a.b.c] # this is best practice
[ d.e.f ] # same as [d.e.f]
[ g . h . i ] # same as [g.h.i]
[ j . "ʞ" . 'l' ] # same as [j."ʞ".'l']
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-41.json 0000664 0000000 0000000 00000000147 15130702260 0030644 0 ustar 00root root 0000000 0000000 {
"x": {
"y": {
"z": {
"w": {}
}
}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-41.toml 0000664 0000000 0000000 00000000170 15130702260 0030642 0 ustar 00root root 0000000 0000000 # [x] you
# [x.y] don't
# [x.y.z] need these
[x.y.z.w] # for this to work
[x] # defining a super-table afterward is ok
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-42.json 0000664 0000000 0000000 00000000126 15130702260 0030642 0 ustar 00root root 0000000 0000000 {
"animal": {},
"fruit": {
"apple": {},
"orange": {}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-42.toml 0000664 0000000 0000000 00000000076 15130702260 0030650 0 ustar 00root root 0000000 0000000 # VALID BUT DISCOURAGED
[fruit.apple]
[animal]
[fruit.orange]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-43.json 0000664 0000000 0000000 00000000126 15130702260 0030643 0 ustar 00root root 0000000 0000000 {
"animal": {},
"fruit": {
"apple": {},
"orange": {}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-43.toml 0000664 0000000 0000000 00000000064 15130702260 0030646 0 ustar 00root root 0000000 0000000 # RECOMMENDED
[fruit.apple]
[fruit.orange]
[animal]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-44.json 0000664 0000000 0000000 00000000410 15130702260 0030640 0 ustar 00root root 0000000 0000000 {
"breed": {"type": "string", "value": "pug"},
"name": {"type": "string", "value": "Fido"},
"owner": {
"member_since": {"type": "date-local", "value": "1999-08-04"},
"name": {"type": "string", "value": "Regina Dogman"}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-44.toml 0000664 0000000 0000000 00000000210 15130702260 0030640 0 ustar 00root root 0000000 0000000 # Top-level table begins.
name = "Fido"
breed = "pug"
# Top-level table ends.
[owner]
name = "Regina Dogman"
member_since = 1999-08-04
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-45.json 0000664 0000000 0000000 00000000317 15130702260 0030647 0 ustar 00root root 0000000 0000000 {
"fruit": {
"apple": {
"color": {"type": "string", "value": "red"},
"taste": {
"sweet": {"type": "bool", "value": "true"}
}
}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-45.toml 0000664 0000000 0000000 00000000323 15130702260 0030646 0 ustar 00root root 0000000 0000000 fruit.apple.color = "red"
# Defines a table named fruit
# Defines a table named fruit.apple
fruit.apple.taste.sweet = true
# Defines a table named fruit.apple.taste
# fruit and fruit.apple were already created
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-46.json 0000664 0000000 0000000 00000000463 15130702260 0030652 0 ustar 00root root 0000000 0000000 {
"fruit": {
"apple": {
"color": {"type": "string", "value": "red"},
"taste": {
"sweet": {"type": "bool", "value": "true"}
},
"texture": {
"smooth": {"type": "bool", "value": "true"}
}
}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-46.toml 0000664 0000000 0000000 00000000261 15130702260 0030650 0 ustar 00root root 0000000 0000000 [fruit]
apple.color = "red"
apple.taste.sweet = true
# [fruit.apple] # INVALID
# [fruit.apple.taste] # INVALID
[fruit.apple.texture] # you can add sub-tables
smooth = true
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-47.json 0000664 0000000 0000000 00000001326 15130702260 0030652 0 ustar 00root root 0000000 0000000 {
"animal": {
"type": {
"name": {"type": "string", "value": "pug"}
}
},
"contact": {
"personal": {
"email": {"type": "string", "value": "donald@duckburg.com"},
"name": {"type": "string", "value": "Donald Duck"}
},
"work": {
"email": {"type": "string", "value": "donald@ScroogeCorp.com"},
"name": {"type": "string", "value": "Coin cleaner"}
}
},
"name": {
"first": {"type": "string", "value": "Tom"},
"last": {"type": "string", "value": "Preston-Werner"}
},
"point": {
"x": {"type": "integer", "value": "1"},
"y": {"type": "integer", "value": "2"}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-47.toml 0000664 0000000 0000000 00000000454 15130702260 0030655 0 ustar 00root root 0000000 0000000 name = { first = "Tom", last = "Preston-Werner" }
point = {x=1, y=2}
animal = { type.name = "pug" }
contact = {
personal = {
name = "Donald Duck",
email = "donald@duckburg.com",
},
work = {
name = "Coin cleaner",
email = "donald@ScroogeCorp.com",
},
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-48.json 0000664 0000000 0000000 00000001326 15130702260 0030653 0 ustar 00root root 0000000 0000000 {
"animal": {
"type": {
"name": {"type": "string", "value": "pug"}
}
},
"contact": {
"personal": {
"email": {"type": "string", "value": "donald@duckburg.com"},
"name": {"type": "string", "value": "Donald Duck"}
},
"work": {
"email": {"type": "string", "value": "donald@ScroogeCorp.com"},
"name": {"type": "string", "value": "Coin cleaner"}
}
},
"name": {
"first": {"type": "string", "value": "Tom"},
"last": {"type": "string", "value": "Preston-Werner"}
},
"point": {
"x": {"type": "integer", "value": "1"},
"y": {"type": "integer", "value": "2"}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-48.toml 0000664 0000000 0000000 00000000354 15130702260 0030655 0 ustar 00root root 0000000 0000000 [name]
first = "Tom"
last = "Preston-Werner"
[point]
x = 1
y = 2
[animal]
type.name = "pug"
[contact.personal]
name = "Donald Duck"
email = "donald@duckburg.com"
[contact.work]
name = "Coin cleaner"
email = "donald@ScroogeCorp.com"
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-49.json 0000664 0000000 0000000 00000000157 15130702260 0030655 0 ustar 00root root 0000000 0000000 {
"product": {
"type": {
"name": {"type": "string", "value": "Nail"}
}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-49.toml 0000664 0000000 0000000 00000000104 15130702260 0030647 0 ustar 00root root 0000000 0000000 [product]
type = { name = "Nail" }
# type.edible = false # INVALID
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-50.json 0000664 0000000 0000000 00000000157 15130702260 0030645 0 ustar 00root root 0000000 0000000 {
"product": {
"type": {
"name": {"type": "string", "value": "Nail"}
}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-50.toml 0000664 0000000 0000000 00000000104 15130702260 0030637 0 ustar 00root root 0000000 0000000 [product]
type.name = "Nail"
# type = { edible = false } # INVALID
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-51.json 0000664 0000000 0000000 00000000574 15130702260 0030651 0 ustar 00root root 0000000 0000000 {
"product": [
{
"name": {"type": "string", "value": "Hammer"},
"sku": {"type": "integer", "value": "738594937"}
},
{},
{
"color": {"type": "string", "value": "gray"},
"name": {"type": "string", "value": "Nail"},
"sku": {"type": "integer", "value": "284758393"}
}
]
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-51.toml 0000664 0000000 0000000 00000000224 15130702260 0030643 0 ustar 00root root 0000000 0000000 [[product]]
name = "Hammer"
sku = 738594937
[[product]] # empty table within the array
[[product]]
name = "Nail"
sku = 284758393
color = "gray"
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-52.json 0000664 0000000 0000000 00000001317 15130702260 0030646 0 ustar 00root root 0000000 0000000 {
"fruits": [
{
"name": {"type": "string", "value": "apple"},
"physical": {
"color": {"type": "string", "value": "red"},
"shape": {"type": "string", "value": "round"}
},
"varieties": [
{
"name": {"type": "string", "value": "red delicious"}
},
{
"name": {"type": "string", "value": "granny smith"}
}
]
},
{
"name": {"type": "string", "value": "banana"},
"varieties": [{
"name": {"type": "string", "value": "plantain"}
}]
}
]
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-52.toml 0000664 0000000 0000000 00000000417 15130702260 0030650 0 ustar 00root root 0000000 0000000 [[fruits]]
name = "apple"
[fruits.physical] # subtable
color = "red"
shape = "round"
[[fruits.varieties]] # nested array of tables
name = "red delicious"
[[fruits.varieties]]
name = "granny smith"
[[fruits]]
name = "banana"
[[fruits.varieties]]
name = "plantain"
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-53.json 0000664 0000000 0000000 00000001051 15130702260 0030642 0 ustar 00root root 0000000 0000000 {
"points": [
{
"x": {"type": "integer", "value": "1"},
"y": {"type": "integer", "value": "2"},
"z": {"type": "integer", "value": "3"}
},
{
"x": {"type": "integer", "value": "7"},
"y": {"type": "integer", "value": "8"},
"z": {"type": "integer", "value": "9"}
},
{
"x": {"type": "integer", "value": "2"},
"y": {"type": "integer", "value": "4"},
"z": {"type": "integer", "value": "8"}
}
]
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-53.toml 0000664 0000000 0000000 00000000155 15130702260 0030650 0 ustar 00root root 0000000 0000000 points = [ { x = 1, y = 2, z = 3 },
{ x = 7, y = 8, z = 9 },
{ x = 2, y = 4, z = 8 } ]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-6.json 0000664 0000000 0000000 00000000412 15130702260 0030560 0 ustar 00root root 0000000 0000000 {
"name": {"type": "string", "value": "Orange"},
"physical": {
"color": {"type": "string", "value": "orange"},
"shape": {"type": "string", "value": "round"}
},
"site": {
"google.com": {"type": "bool", "value": "true"}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-6.toml 0000664 0000000 0000000 00000000134 15130702260 0030563 0 ustar 00root root 0000000 0000000 name = "Orange"
physical.color = "orange"
physical.shape = "round"
site."google.com" = true
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-7.json 0000664 0000000 0000000 00000000303 15130702260 0030560 0 ustar 00root root 0000000 0000000 {
"fruit": {
"color": {"type": "string", "value": "yellow"},
"flavor": {"type": "string", "value": "banana"},
"name": {"type": "string", "value": "banana"}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-7.toml 0000664 0000000 0000000 00000000231 15130702260 0030562 0 ustar 00root root 0000000 0000000 fruit.name = "banana" # this is best practice
fruit. color = "yellow" # same as fruit.color
fruit . flavor = "banana" # same as fruit.flavor
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-8.json 0000664 0000000 0000000 00000000243 15130702260 0030564 0 ustar 00root root 0000000 0000000 {
"fruit": {
"orange": {"type": "integer", "value": "2"},
"apple": {
"smooth": {"type": "bool", "value": "true"}
}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-8.toml 0000664 0000000 0000000 00000000213 15130702260 0030563 0 ustar 00root root 0000000 0000000 # This makes the key "fruit" into a table.
fruit.apple.smooth = true
# So then you can add to the table "fruit" like so:
fruit.orange = 2
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-9.json 0000664 0000000 0000000 00000000566 15130702260 0030575 0 ustar 00root root 0000000 0000000 {
"apple": {
"color": {"type": "string", "value": "red"},
"skin": {"type": "string", "value": "thin"},
"type": {"type": "string", "value": "fruit"}
},
"orange": {
"color": {"type": "string", "value": "orange"},
"skin": {"type": "string", "value": "thick"},
"type": {"type": "string", "value": "fruit"}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-9.toml 0000664 0000000 0000000 00000000234 15130702260 0030567 0 ustar 00root root 0000000 0000000 # VALID BUT DISCOURAGED
apple.type = "fruit"
orange.type = "fruit"
apple.skin = "thin"
orange.skin = "thick"
apple.color = "red"
orange.color = "orange"
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-example-1-compact.json 0000664 0000000 0000000 00000002541 15130702260 0031712 0 ustar 00root root 0000000 0000000 {
"title": {"type": "string", "value": "TOML Example"},
"clients": {
"data": [
[
{"type": "string", "value": "gamma"},
{"type": "string", "value": "delta"}
],
[
{"type": "integer", "value": "1"},
{"type": "integer", "value": "2"}
]
],
"hosts": [
{"type": "string", "value": "alpha"},
{"type": "string", "value": "omega"}
]
},
"database": {
"connection_max": {"type": "integer", "value": "5000"},
"enabled": {"type": "bool", "value": "true"},
"server": {"type": "string", "value": "192.168.1.1"},
"ports": [
{"type": "integer", "value": "8001"},
{"type": "integer", "value": "8001"},
{"type": "integer", "value": "8002"}
]
},
"owner": {
"dob": {"type": "datetime", "value": "1979-05-27T07:32:00-08:00"},
"name": {"type": "string", "value": "Lance Uppercut"}
},
"servers": {
"alpha": {
"dc": {"type": "string", "value": "eqdc10"},
"ip": {"type": "string", "value": "10.0.0.1"}
},
"beta": {
"dc": {"type": "string", "value": "eqdc10"},
"ip": {"type": "string", "value": "10.0.0.2"}
}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-example-1-compact.toml 0000664 0000000 0000000 00000000570 15130702260 0031714 0 ustar 00root root 0000000 0000000 #Useless spaces eliminated.
title="TOML Example"
[owner]
name="Lance Uppercut"
dob=1979-05-27T07:32:00-08:00#First class dates
[database]
server="192.168.1.1"
ports=[8001,8001,8002]
connection_max=5000
enabled=true
[servers]
[servers.alpha]
ip="10.0.0.1"
dc="eqdc10"
[servers.beta]
ip="10.0.0.2"
dc="eqdc10"
[clients]
data=[["gamma","delta"],[1,2]]
hosts=[
"alpha",
"omega"
]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-example-1.json 0000664 0000000 0000000 00000002541 15130702260 0030266 0 ustar 00root root 0000000 0000000 {
"title": {"type": "string", "value": "TOML Example"},
"clients": {
"data": [
[
{"type": "string", "value": "gamma"},
{"type": "string", "value": "delta"}
],
[
{"type": "integer", "value": "1"},
{"type": "integer", "value": "2"}
]
],
"hosts": [
{"type": "string", "value": "alpha"},
{"type": "string", "value": "omega"}
]
},
"database": {
"connection_max": {"type": "integer", "value": "5000"},
"enabled": {"type": "bool", "value": "true"},
"server": {"type": "string", "value": "192.168.1.1"},
"ports": [
{"type": "integer", "value": "8001"},
{"type": "integer", "value": "8001"},
{"type": "integer", "value": "8002"}
]
},
"owner": {
"dob": {"type": "datetime", "value": "1979-05-27T07:32:00-08:00"},
"name": {"type": "string", "value": "Lance Uppercut"}
},
"servers": {
"alpha": {
"dc": {"type": "string", "value": "eqdc10"},
"ip": {"type": "string", "value": "10.0.0.1"}
},
"beta": {
"dc": {"type": "string", "value": "eqdc10"},
"ip": {"type": "string", "value": "10.0.0.2"}
}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/spec-example-1.toml 0000664 0000000 0000000 00000001057 15130702260 0030271 0 ustar 00root root 0000000 0000000 # This is a TOML document. Boom.
title = "TOML Example"
[owner]
name = "Lance Uppercut"
dob = 1979-05-27T07:32:00-08:00 # First class dates? Why not?
[database]
server = "192.168.1.1"
ports = [ 8001, 8001, 8002 ]
connection_max = 5000
enabled = true
[servers]
# You can indent as you please. Tabs or spaces. TOML don't care.
[servers.alpha]
ip = "10.0.0.1"
dc = "eqdc10"
[servers.beta]
ip = "10.0.0.2"
dc = "eqdc10"
[clients]
data = [ ["gamma", "delta"], [1, 2] ]
# Line breaks are OK when inside arrays
hosts = [
"alpha",
"omega"
]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/ 0000775 0000000 0000000 00000000000 15130702260 0026156 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/basic-escape-01.json 0000664 0000000 0000000 00000000067 15130702260 0031611 0 ustar 00root root 0000000 0000000 {
"test": {"type": "string", "value": "\"one\""}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/basic-escape-01.toml 0000664 0000000 0000000 00000000034 15130702260 0031605 0 ustar 00root root 0000000 0000000 # Escape "
test = "\"one\""
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/basic-escape-02.json 0000664 0000000 0000000 00000000067 15130702260 0031612 0 ustar 00root root 0000000 0000000 {
"test": {"type": "string", "value": "\\\"one"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/basic-escape-02.toml 0000664 0000000 0000000 00000000047 15130702260 0031612 0 ustar 00root root 0000000 0000000 # Escape \ and then "
test = "\\\"one"
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/basic-escape-03.json 0000664 0000000 0000000 00000000075 15130702260 0031612 0 ustar 00root root 0000000 0000000 {
"test": {"type": "string", "value": "\\\\\\\\\"one"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/basic-escape-03.toml 0000664 0000000 0000000 00000000070 15130702260 0031607 0 ustar 00root root 0000000 0000000 # Escape \ four times and then "
test = "\\\\\\\\\"one"
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/empty.json 0000664 0000000 0000000 00000000062 15130702260 0030205 0 ustar 00root root 0000000 0000000 {
"answer": {"type": "string", "value": ""}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/empty.toml 0000664 0000000 0000000 00000000014 15130702260 0030204 0 ustar 00root root 0000000 0000000 answer = ""
ends-in-whitespace-escape.json 0000664 0000000 0000000 00000000074 15130702260 0033720 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string {
"beee": {"type": "string", "value": "heeee\ngeeee"}
}
ends-in-whitespace-escape.toml 0000664 0000000 0000000 00000000046 15130702260 0033721 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string beee = """
heeee
geeee\
"""
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/escape-esc.json 0000664 0000000 0000000 00000000120 15130702260 0031052 0 ustar 00root root 0000000 0000000 {
"esc": {"type": "string", "value": "\u001b There is no escape! \u001b"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/escape-esc.toml 0000664 0000000 0000000 00000000042 15130702260 0031057 0 ustar 00root root 0000000 0000000 esc = "\e There is no escape! \e"
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/escape-tricky.json 0000664 0000000 0000000 00000001143 15130702260 0031613 0 ustar 00root root 0000000 0000000 {
"end_esc": {"type": "string", "value": "String does not end here\" but ends here\\"},
"lit_end_esc": {"type": "string", "value": "String ends here\\"},
"lit_multiline_end": {"type": "string", "value": "There is no escape\\"},
"lit_multiline_not_unicode": {"type": "string", "value": "\\u007f"},
"multiline_end_esc": {"type": "string", "value": "When will it end? \"\"\"...\"\"\" should be here\""},
"multiline_not_unicode": {"type": "string", "value": "\\u0041"},
"multiline_unicode": {"type": "string", "value": " "}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/escape-tricky.toml 0000664 0000000 0000000 00000000510 15130702260 0031612 0 ustar 00root root 0000000 0000000 end_esc = "String does not end here\" but ends here\\"
lit_end_esc = 'String ends here\'
multiline_unicode = """
\u00a0"""
multiline_not_unicode = """
\\u0041"""
multiline_end_esc = """When will it end? \"""...""\" should be here\""""
lit_multiline_not_unicode = '''
\u007f'''
lit_multiline_end = '''There is no escape\'''
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/escaped-escape.json 0000664 0000000 0000000 00000000067 15130702260 0031716 0 ustar 00root root 0000000 0000000 {
"answer": {"type": "string", "value": "\\x64"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/escaped-escape.toml 0000664 0000000 0000000 00000000021 15130702260 0031706 0 ustar 00root root 0000000 0000000 answer = "\\x64"
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/escapes.json 0000664 0000000 0000000 00000001400 15130702260 0030467 0 ustar 00root root 0000000 0000000 {
"backslash": {"type": "string", "value": "|\\."},
"backspace": {"type": "string", "value": "|\b."},
"carriage": {"type": "string", "value": "|\r."},
"delete": {"type": "string", "value": "|."},
"formfeed": {"type": "string", "value": "|\f."},
"newline": {"type": "string", "value": "|\n."},
"notunicode1": {"type": "string", "value": "|\\u."},
"notunicode2": {"type": "string", "value": "|\\u."},
"notunicode3": {"type": "string", "value": "|\\u0075."},
"notunicode4": {"type": "string", "value": "|\\u."},
"quote": {"type": "string", "value": "|\"."},
"tab": {"type": "string", "value": "|\t."},
"unitseparator": {"type": "string", "value": "|\u001f."}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/escapes.toml 0000664 0000000 0000000 00000000603 15130702260 0030475 0 ustar 00root root 0000000 0000000 backspace = "|\b."
tab = "|\t."
newline = "|\n."
formfeed = "|\f."
carriage = "|\r."
quote = "|\"."
backslash = "|\\."
delete = "|\u007F."
unitseparator = "|\u001F."
# \u is escaped, so should NOT be interperted as a \u escape.
notunicode1 = "|\\u."
notunicode2 = "|\u005Cu."
notunicode3 = "|\\u0075."
notunicode4 = "|\\\u0075."
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/hex-escape.json 0000664 0000000 0000000 00000001141 15130702260 0031070 0 ustar 00root root 0000000 0000000 {
"bs": {"type": "string", "value": ""},
"hello": {"type": "string", "value": "hello\n"},
"higher-than-127": {"type": "string", "value": "Sørmirbæren"},
"literal": {"type": "string", "value": "\\x20 \\x09 \\x0d\\x0a"},
"multiline": {"type": "string", "value": " \t \u001b \r\n\n\n\u0000\nhello\n\nSørmirbæren\n"},
"multiline-literal": {"type": "string", "value": "\\x20 \\x09 \\x0d\\x0a\n"},
"nul": {"type": "string", "value": "\u0000"},
"whitespace": {"type": "string", "value": " \t \u001b \r\n"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/hex-escape.toml 0000664 0000000 0000000 00000000667 15130702260 0031106 0 ustar 00root root 0000000 0000000 # \x for the first 255 codepoints
whitespace = "\x20 \x09 \x1b \x0d\x0a"
bs = "\x7f"
nul = "\x00"
hello = "\x68\x65\x6c\x6c\x6f\x0a"
higher-than-127 = "S\xf8rmirb\xe6ren"
multiline = """
\x20 \x09 \x1b \x0d\x0a
\x7f
\x00
\x68\x65\x6c\x6c\x6f\x0a
\x53\xF8\x72\x6D\x69\x72\x62\xE6\x72\x65\x6E
"""
# Not inside literals.
literal = '\x20 \x09 \x0d\x0a'
multiline-literal = '''
\x20 \x09 \x0d\x0a
'''
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/multibyte-escape.json 0000664 0000000 0000000 00000000443 15130702260 0032326 0 ustar 00root root 0000000 0000000 {
"basic-1": {"type": "string", "value": "ɑ € 𐫱 ɑ€𐫱"},
"ml-basic-1": {"type": "string", "value": "ɑ € 𐫱 ɑ€𐫱"},
"basic-2": {"type": "string", "value": "ɑ € 𐫱 ɑ€𐫱"},
"ml-basic-2": {"type": "string", "value": "ɑ € 𐫱 ɑ€𐫱"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/multibyte-escape.toml 0000664 0000000 0000000 00000000600 15130702260 0032323 0 ustar 00root root 0000000 0000000 # Test each multibyte length: 2, 3, and 4 bytes:
# ɑ € 𐫱
basic-1 = "\u0251 \u20ac \U00010AF1 \u0251\u20ac\U00010AF1"
ml-basic-1 = """\u0251 \u20ac \U00010AF1 \u0251\u20ac\U00010AF1"""
# Again, but only using \U
basic-2 = "\U00000251 \U000020ac \U00010AF1 \U00000251\U000020ac\U00010AF1"
ml-basic-2 = """\U00000251 \U000020ac \U00010AF1 \U00000251\U000020ac\U00010AF1"""
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/multibyte.json 0000664 0000000 0000000 00000000433 15130702260 0031067 0 ustar 00root root 0000000 0000000 {
"basic": {"type": "string", "value": "ɑ € 𐫱 ɑ€𐫱"},
"ml-basic": {"type": "string", "value": "ɑ € 𐫱 ɑ€𐫱"},
"ml-raw": {"type": "string", "value": "ɑ € 𐫱 ɑ€𐫱"},
"raw": {"type": "string", "value": "ɑ € 𐫱 ɑ€𐫱"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/multibyte.toml 0000664 0000000 0000000 00000000324 15130702260 0031070 0 ustar 00root root 0000000 0000000 # Test each multibyte length: 2, 3, and 4 bytes:
# ɑ € 𐫱
basic = "ɑ € 𐫱 ɑ€𐫱"
raw = 'ɑ € 𐫱 ɑ€𐫱'
ml-basic = """ɑ € 𐫱 ɑ€𐫱"""
ml-raw = '''ɑ € 𐫱 ɑ€𐫱'''
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/multiline-empty.json 0000664 0000000 0000000 00000000303 15130702260 0032203 0 ustar 00root root 0000000 0000000 {
"empty-1": {"type": "string", "value": ""},
"empty-2": {"type": "string", "value": ""},
"empty-3": {"type": "string", "value": ""},
"empty-4": {"type": "string", "value": ""}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/multiline-empty.toml 0000664 0000000 0000000 00000000430 15130702260 0032206 0 ustar 00root root 0000000 0000000 empty-1 = """"""
# A newline immediately following the opening delimiter will be trimmed.
empty-2 = """
"""
# \ at the end of line trims newlines as well; note that last \ is followed by
# two spaces, which are ignored.
empty-3 = """\
"""
empty-4 = """\
\
\
"""
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/multiline-escaped-crlf.json 0000664 0000000 0000000 00000000055 15130702260 0033401 0 ustar 00root root 0000000 0000000 {
"0": {"type": "string", "value": ""}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/multiline-escaped-crlf.toml 0000664 0000000 0000000 00000000167 15130702260 0033407 0 ustar 00root root 0000000 0000000 # The following line should be an unescaped backslash followed by a Windows
# newline sequence ("\r\n")
0="""\
"""
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/multiline-quotes.json 0000664 0000000 0000000 00000001621 15130702260 0032371 0 ustar 00root root 0000000 0000000 {
"escaped": {"type": "string", "value": "lol\"\"\""},
"five-quotes": {"type": "string", "value": "Closing with five quotes\n\"\""},
"four-quotes": {"type": "string", "value": "Closing with four quotes\n\""},
"lit_one": {"type": "string", "value": "'one quote'"},
"lit_one_space": {"type": "string", "value": " 'one quote' "},
"lit_two": {"type": "string", "value": "''two quotes''"},
"lit_two_space": {"type": "string", "value": " ''two quotes'' "},
"mismatch1": {"type": "string", "value": "aaa'''bbb"},
"mismatch2": {"type": "string", "value": "aaa\"\"\"bbb"},
"one": {"type": "string", "value": "\"one quote\""},
"one_space": {"type": "string", "value": " \"one quote\" "},
"two": {"type": "string", "value": "\"\"two quotes\"\""},
"two_space": {"type": "string", "value": " \"\"two quotes\"\" "}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/multiline-quotes.toml 0000664 0000000 0000000 00000001230 15130702260 0032367 0 ustar 00root root 0000000 0000000 # Make sure that quotes inside multiline strings are allowed, including right
# after the opening '''/""" and before the closing '''/"""
lit_one = ''''one quote''''
lit_two = '''''two quotes'''''
lit_one_space = ''' 'one quote' '''
lit_two_space = ''' ''two quotes'' '''
one = """"one quote""""
two = """""two quotes"""""
one_space = """ "one quote" """
two_space = """ ""two quotes"" """
mismatch1 = """aaa'''bbb"""
mismatch2 = '''aaa"""bbb'''
# Three opening """, then one escaped ", then two "" (allowed), and then three
# closing """
escaped = """lol\""""""
five-quotes = """
Closing with five quotes
"""""
four-quotes = """
Closing with four quotes
""""
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/multiline.json 0000664 0000000 0000000 00000001357 15130702260 0031061 0 ustar 00root root 0000000 0000000 {
"equivalent_one": {"type": "string", "value": "The quick brown fox jumps over the lazy dog."},
"equivalent_three": {"type": "string", "value": "The quick brown fox jumps over the lazy dog."},
"equivalent_two": {"type": "string", "value": "The quick brown fox jumps over the lazy dog."},
"escape-bs-1": {"type": "string", "value": "a \\\nb"},
"escape-bs-2": {"type": "string", "value": "a \\b"},
"escape-bs-3": {"type": "string", "value": "a \\\\\n b"},
"keep-ws-before": {"type": "string", "value": "a \tb"},
"no-space": {"type": "string", "value": "ab"},
"whitespace-after-bs": {"type": "string", "value": "The quick brown fox jumps over the lazy dog."}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/multiline.toml 0000664 0000000 0000000 00000001124 15130702260 0031053 0 ustar 00root root 0000000 0000000 # NOTE: this file includes some literal tab characters.
equivalent_one = "The quick brown fox jumps over the lazy dog."
equivalent_two = """
The quick brown \
fox jumps over \
the lazy dog."""
equivalent_three = """\
The quick brown \
fox jumps over \
the lazy dog.\
"""
whitespace-after-bs = """\
The quick brown \
fox jumps over \
the lazy dog.\
"""
no-space = """a\
b"""
# Has tab character.
keep-ws-before = """a \
b"""
escape-bs-1 = """a \\
b"""
escape-bs-2 = """a \\\
b"""
escape-bs-3 = """a \\\\
b"""
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/nl.json 0000664 0000000 0000000 00000000447 15130702260 0027467 0 ustar 00root root 0000000 0000000 {
"lit_nl_end": {"type": "string", "value": "value\\n"},
"lit_nl_mid": {"type": "string", "value": "val\\nue"},
"lit_nl_uni": {"type": "string", "value": "val\\ue"},
"nl_end": {"type": "string", "value": "value\n"},
"nl_mid": {"type": "string", "value": "val\nue"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/nl.toml 0000664 0000000 0000000 00000000163 15130702260 0027464 0 ustar 00root root 0000000 0000000 nl_mid = "val\nue"
nl_end = """value\n"""
lit_nl_end = '''value\n'''
lit_nl_mid = 'val\nue'
lit_nl_uni = 'val\ue'
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/quoted-unicode.json 0000664 0000000 0000000 00000000713 15130702260 0031777 0 ustar 00root root 0000000 0000000 {
"basic_string": {"type": "string", "value": "~ ÿ 𐀀 "},
"escaped_string": {"type": "string", "value": "\u0000 \b \f A ÿ 𐀀 "},
"literal_string": {"type": "string", "value": "~ ÿ 𐀀 "},
"not_escaped_string": {
"type": "string",
"value": "\\u0000 \\u0008 \\u000c \\U00000041 \\u007f \\u0080 \\u00ff \\ud7ff \\ue000 \\uffff \\U00010000 \\U0010ffff"
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/quoted-unicode.toml 0000664 0000000 0000000 00000000514 15130702260 0032000 0 ustar 00root root 0000000 0000000
escaped_string = "\u0000 \u0008 \u000c \U00000041 \u007f \u0080 \u00ff \ud7ff \ue000 \uffff \U00010000 \U0010ffff"
not_escaped_string = '\u0000 \u0008 \u000c \U00000041 \u007f \u0080 \u00ff \ud7ff \ue000 \uffff \U00010000 \U0010ffff'
basic_string = "~ ÿ 𐀀 "
literal_string = '~ ÿ 𐀀 '
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/raw-empty.json 0000664 0000000 0000000 00000000061 15130702260 0030773 0 ustar 00root root 0000000 0000000 {
"empty": {"type": "string", "value": ""}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/raw-empty.toml 0000664 0000000 0000000 00000000013 15130702260 0030772 0 ustar 00root root 0000000 0000000 empty = ''
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/raw-multiline.json 0000664 0000000 0000000 00000001036 15130702260 0031642 0 ustar 00root root 0000000 0000000 {
"firstnl": {"type": "string", "value": "This string has a ' quote character."},
"multiline": {"type": "string", "value": "This string\nhas ' a quote character\nand more than\none newline\nin it."},
"multiline_with_tab": {"type": "string", "value": "First line\n\t Followed by a tab"},
"oneline": {"type": "string", "value": "This string has a ' quote character."},
"this-str-has-apostrophes": {"type": "string", "value": "' there's one already\n'' two more\n''"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/raw-multiline.toml 0000664 0000000 0000000 00000001047 15130702260 0031646 0 ustar 00root root 0000000 0000000 # Single ' should be allowed.
oneline = '''This string has a ' quote character.'''
# A newline immediately following the opening delimiter will be trimmed.
firstnl = '''
This string has a ' quote character.'''
# All other whitespace and newline characters remain intact.
multiline = '''
This string
has ' a quote character
and more than
one newline
in it.'''
# Tab character in literal string does not need to be escaped
multiline_with_tab = '''First line
Followed by a tab'''
this-str-has-apostrophes='''' there's one already
'' two more
'''''
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/raw.json 0000664 0000000 0000000 00000001403 15130702260 0027640 0 ustar 00root root 0000000 0000000 {
"backslash": {"type": "string", "value": "This string has a \\\\ backslash character."},
"backspace": {"type": "string", "value": "This string has a \\b backspace character."},
"carriage": {"type": "string", "value": "This string has a \\r carriage return character."},
"formfeed": {"type": "string", "value": "This string has a \\f form feed character."},
"newline": {"type": "string", "value": "This string has a \\n new line character."},
"slash": {"type": "string", "value": "This string has a \\/ slash character."},
"tab": {"type": "string", "value": "This string has a \\t tab character."},
"unescaped_tab": {"type": "string", "value": "This string has an \t unescaped tab character."}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/raw.toml 0000664 0000000 0000000 00000000665 15130702260 0027653 0 ustar 00root root 0000000 0000000 backspace = 'This string has a \b backspace character.'
tab = 'This string has a \t tab character.'
unescaped_tab = 'This string has an unescaped tab character.'
newline = 'This string has a \n new line character.'
formfeed = 'This string has a \f form feed character.'
carriage = 'This string has a \r carriage return character.'
slash = 'This string has a \/ slash character.'
backslash = 'This string has a \\ backslash character.'
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/simple.json 0000664 0000000 0000000 00000000125 15130702260 0030340 0 ustar 00root root 0000000 0000000 {
"answer": {"type": "string", "value": "You are not drinking enough whisky."}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/simple.toml 0000664 0000000 0000000 00000000057 15130702260 0030346 0 ustar 00root root 0000000 0000000 answer = "You are not drinking enough whisky."
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/start-mb.json 0000664 0000000 0000000 00000000476 15130702260 0030611 0 ustar 00root root 0000000 0000000 {
"s1": {"type": "string", "value": "§"},
"s2": {"type": "string", "value": "§"},
"s3": {"type": "string", "value": "§"},
"s4": {"type": "string", "value": "§"},
"s5": {"type": "string", "value": "§"},
"s6": {"type": "string", "value": "§"},
"s7": {"type": "string", "value": "§"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/start-mb.toml 0000664 0000000 0000000 00000000303 15130702260 0030600 0 ustar 00root root 0000000 0000000 # Start first line with a multibyte character.
#
# https://github.com/marzer/tomlplusplus/issues/190
s1 = "§"
s2 = '§'
s3 = """\
§"""
s4 = """
§"""
s5 = """§"""
s6 = '''
§'''
s7 = '''§'''
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/unicode-escape.json 0000664 0000000 0000000 00000001363 15130702260 0031740 0 ustar 00root root 0000000 0000000 {
"a": {"type": "string", "value": "a"},
"b": {"type": "string", "value": "b"},
"c": {"type": "string", "value": "c"},
"delta-1": {"type": "string", "value": "δ"},
"delta-2": {"type": "string", "value": "δ"},
"ml-a": {"type": "string", "value": "a"},
"ml-b": {"type": "string", "value": "b"},
"ml-c": {"type": "string", "value": "c"},
"ml-delta-1": {"type": "string", "value": "δ"},
"ml-delta-2": {"type": "string", "value": "δ"},
"ml-null-1": {"type": "string", "value": "\u0000"},
"ml-null-2": {"type": "string", "value": "\u0000"},
"null-1": {"type": "string", "value": "\u0000"},
"null-2": {"type": "string", "value": "\u0000"}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/unicode-escape.toml 0000664 0000000 0000000 00000000524 15130702260 0031740 0 ustar 00root root 0000000 0000000 delta-1 = "\u03B4"
delta-2 = "\U000003B4"
a = "\u0061"
b = "\u0062"
c = "\U00000063"
null-1 = "\u0000"
null-2 = "\U00000000"
ml-delta-1 = """\u03B4"""
ml-delta-2 = """\U000003B4"""
ml-a = """\u0061"""
ml-b = """\u0062"""
ml-c = """\U00000063"""
ml-null-1 = """\u0000"""
ml-null-2 = """\U00000000"""
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/with-pound.json 0000664 0000000 0000000 00000000252 15130702260 0031146 0 ustar 00root root 0000000 0000000 {
"pound": {"type": "string", "value": "We see no # comments here."},
"poundcomment": {"type": "string", "value": "But there are # some comments here."}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/string/with-pound.toml 0000664 0000000 0000000 00000000161 15130702260 0031147 0 ustar 00root root 0000000 0000000 pound = "We see no # comments here."
poundcomment = "But there are # some comments here." # Did I # mess you up?
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/ 0000775 0000000 0000000 00000000000 15130702260 0025737 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/array-empty-name.json 0000664 0000000 0000000 00000000167 15130702260 0032026 0 ustar 00root root 0000000 0000000 {
"": [
{"a": {"type": "integer", "value": "1"}},
{"a": {"type": "integer", "value": "2"}}
]
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/array-empty-name.toml 0000664 0000000 0000000 00000000073 15130702260 0032024 0 ustar 00root root 0000000 0000000 # Silly thing to do, but valid.
[['']]
a = 1
[['']]
a = 2
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/array-empty.json 0000664 0000000 0000000 00000000022 15130702260 0031076 0 ustar 00root root 0000000 0000000 {
"a": [{}]
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/array-empty.toml 0000664 0000000 0000000 00000000006 15130702260 0031102 0 ustar 00root root 0000000 0000000 [[a]]
array-implicit-and-explicit-after.json 0000664 0000000 0000000 00000000223 15130702260 0035154 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table {
"a": {
"b": [{
"x": {"type": "integer", "value": "1"}
}],
"y": {"type": "integer", "value": "2"}
}
}
array-implicit-and-explicit-after.toml 0000664 0000000 0000000 00000000031 15130702260 0035153 0 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table [[a.b]]
x = 1
[a]
y = 2
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/array-implicit.json 0000664 0000000 0000000 00000000141 15130702260 0031554 0 ustar 00root root 0000000 0000000 {
"albums": {"songs": [{
"name": {"type": "string", "value": "Glory Days"}
}]}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/array-implicit.toml 0000664 0000000 0000000 00000000045 15130702260 0031561 0 ustar 00root root 0000000 0000000 [[albums.songs]]
name = "Glory Days"
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/array-many.json 0000664 0000000 0000000 00000000732 15130702260 0030714 0 ustar 00root root 0000000 0000000 {
"people": [
{
"first_name": {"type": "string", "value": "Bruce"},
"last_name": {"type": "string", "value": "Springsteen"}
},
{
"first_name": {"type": "string", "value": "Eric"},
"last_name": {"type": "string", "value": "Clapton"}
},
{
"first_name": {"type": "string", "value": "Bob"},
"last_name": {"type": "string", "value": "Seger"}
}
]
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/array-many.toml 0000664 0000000 0000000 00000000243 15130702260 0030713 0 ustar 00root root 0000000 0000000 [[people]]
first_name = "Bruce"
last_name = "Springsteen"
[[people]]
first_name = "Eric"
last_name = "Clapton"
[[people]]
first_name = "Bob"
last_name = "Seger"
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/array-nest.json 0000664 0000000 0000000 00000001322 15130702260 0030715 0 ustar 00root root 0000000 0000000 {
"albums": [
{
"name": {"type": "string", "value": "Born to Run"},
"songs": [
{
"name": {"type": "string", "value": "Jungleland"}
},
{
"name": {"type": "string", "value": "Meeting Across the River"}
}
]
},
{
"name": {"type": "string", "value": "Born in the USA"},
"songs": [
{
"name": {"type": "string", "value": "Glory Days"}
},
{
"name": {"type": "string", "value": "Dancing in the Dark"}
}
]
}
]
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/array-nest.toml 0000664 0000000 0000000 00000000406 15130702260 0030721 0 ustar 00root root 0000000 0000000 [[albums]]
name = "Born to Run"
[[albums.songs]]
name = "Jungleland"
[[albums.songs]]
name = "Meeting Across the River"
[[albums]]
name = "Born in the USA"
[[albums.songs]]
name = "Glory Days"
[[albums.songs]]
name = "Dancing in the Dark"
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/array-one.json 0000664 0000000 0000000 00000000231 15130702260 0030523 0 ustar 00root root 0000000 0000000 {
"people": [{
"first_name": {"type": "string", "value": "Bruce"},
"last_name": {"type": "string", "value": "Springsteen"}
}]
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/array-one.toml 0000664 0000000 0000000 00000000072 15130702260 0030530 0 ustar 00root root 0000000 0000000 [[people]]
first_name = "Bruce"
last_name = "Springsteen"
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/array-table-array.json 0000664 0000000 0000000 00000000465 15130702260 0032156 0 ustar 00root root 0000000 0000000 {
"a": [{
"b": [
{
"c": {
"d": {"type": "string", "value": "val0"}
}
},
{
"c": {
"d": {"type": "string", "value": "val1"}
}
}
]
}]
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/array-table-array.toml 0000664 0000000 0000000 00000000154 15130702260 0032153 0 ustar 00root root 0000000 0000000 [[a]]
[[a.b]]
[a.b.c]
d = "val0"
[[a.b]]
[a.b.c]
d = "val1"
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/array-within-dotted.json 0000664 0000000 0000000 00000000320 15130702260 0032524 0 ustar 00root root 0000000 0000000 {
"fruit": {
"apple": {
"color": {"type": "string", "value": "red"},
"seeds": [{
"size": {"type": "integer", "value": "2"}
}]
}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/array-within-dotted.toml 0000664 0000000 0000000 00000000074 15130702260 0032534 0 ustar 00root root 0000000 0000000 [fruit]
apple.color = "red"
[[fruit.apple.seeds]]
size = 2
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/empty-name.json 0000664 0000000 0000000 00000000355 15130702260 0030711 0 ustar 00root root 0000000 0000000 {
"": {
"x": {"type": "integer", "value": "1"},
"a": {
"x": {"type": "integer", "value": "2"}
}
},
"a": {
"": {
"x": {"type": "integer", "value": "3"}
}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/empty-name.toml 0000664 0000000 0000000 00000000047 15130702260 0030711 0 ustar 00root root 0000000 0000000 ['']
x = 1
["".a]
x = 2
[a.'']
x = 3
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/empty.json 0000664 0000000 0000000 00000000020 15130702260 0027760 0 ustar 00root root 0000000 0000000 {
"a": {}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/empty.toml 0000664 0000000 0000000 00000000004 15130702260 0027764 0 ustar 00root root 0000000 0000000 [a]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/keyword-with-values.json 0000664 0000000 0000000 00000000422 15130702260 0032562 0 ustar 00root root 0000000 0000000 {
"false": {
"k": {"type": "integer", "value": "2"}
},
"inf": {
"k": {"type": "integer", "value": "3"}
},
"nan": {
"k": {"type": "integer", "value": "4"}
},
"true": {
"k": {"type": "integer", "value": "1"}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/keyword-with-values.toml 0000664 0000000 0000000 00000000066 15130702260 0032570 0 ustar 00root root 0000000 0000000 [true]
k = 1
[false]
k = 2
[inf]
k = 3
[nan]
k = 4
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/keyword.json 0000664 0000000 0000000 00000000107 15130702260 0030314 0 ustar 00root root 0000000 0000000 {
"false": {},
"inf": {},
"nan": {},
"true": {}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/keyword.toml 0000664 0000000 0000000 00000000040 15130702260 0030312 0 ustar 00root root 0000000 0000000 [true]
[false]
[inf]
[nan]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/names-with-values.json 0000664 0000000 0000000 00000001620 15130702260 0032202 0 ustar 00root root 0000000 0000000 {
"a": {
" x ": {
"key": {"type": "integer", "value": "4"}
},
"b": {
"c": {
"key": {"type": "integer", "value": "1"}
}
},
"b.c": {
"key": {"type": "integer", "value": "2"}
},
"d.e": {
"key": {"type": "integer", "value": "3"}
}
},
"d": {
"e": {
"f": {
"key": {"type": "integer", "value": "5"}
}
}
},
"g": {
"h": {
"i": {
"key": {"type": "integer", "value": "6"}
}
}
},
"j": {
"ʞ": {
"l": {
"key": {"type": "integer", "value": "7"}
}
}
},
"x": {
"1": {
"2": {
"key": {"type": "integer", "value": "8"}
}
}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/names-with-values.toml 0000664 0000000 0000000 00000000240 15130702260 0032201 0 ustar 00root root 0000000 0000000 [a.b.c]
key = 1
[a."b.c"]
key = 2
[a.'d.e']
key = 3
[a.' x ']
key = 4
[ d.e.f ]
key = 5
[ g . h . i ]
key = 6
[ j . "ʞ" . 'l' ]
key = 7
[x.1.2]
key = 8
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/names.json 0000664 0000000 0000000 00000000570 15130702260 0027737 0 ustar 00root root 0000000 0000000 {
"a": {
" x ": {},
"b.c": {},
"d.e": {},
"b": {
"c": {}
}
},
"d": {
"e": {
"f": {}
}
},
"g": {
"h": {
"i": {}
}
},
"j": {
"ʞ": {
"l": {}
}
},
"x": {
"1": {
"2": {}
}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/names.toml 0000664 0000000 0000000 00000000132 15130702260 0027733 0 ustar 00root root 0000000 0000000 [a.b.c]
[a."b.c"]
[a.'d.e']
[a.' x ']
[ d.e.f ]
[ g . h . i ]
[ j . "ʞ" . 'l' ]
[x.1.2]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/no-eol.json 0000664 0000000 0000000 00000000024 15130702260 0030017 0 ustar 00root root 0000000 0000000 {
"table": {}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/no-eol.toml 0000664 0000000 0000000 00000000010 15130702260 0030014 0 ustar 00root root 0000000 0000000 [table]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/sub-empty.json 0000664 0000000 0000000 00000000045 15130702260 0030556 0 ustar 00root root 0000000 0000000 {
"a": {
"b": {}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/sub-empty.toml 0000664 0000000 0000000 00000000012 15130702260 0030552 0 ustar 00root root 0000000 0000000 [a]
[a.b]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/sub.json 0000664 0000000 0000000 00000000370 15130702260 0027423 0 ustar 00root root 0000000 0000000 {
"a": {
"key": {"type": "integer", "value": "1"},
"extend": {
"key": {"type": "integer", "value": "2"},
"more": {
"key": {"type": "integer", "value": "3"}
}
}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/sub.toml 0000664 0000000 0000000 00000000143 15130702260 0027423 0 ustar 00root root 0000000 0000000 [a]
key = 1
# a.extend is a key inside the "a" table.
[a.extend]
key = 2
[a.extend.more]
key = 3
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/whitespace.json 0000664 0000000 0000000 00000000030 15130702260 0030757 0 ustar 00root root 0000000 0000000 {
"valid key": {}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/whitespace.toml 0000664 0000000 0000000 00000000016 15130702260 0030765 0 ustar 00root root 0000000 0000000 ["valid key"]
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/with-literal-string.json 0000664 0000000 0000000 00000000220 15130702260 0032535 0 ustar 00root root 0000000 0000000 {
"a": {
"\"b\"": {
"c": {
"answer": {"type": "integer", "value": "42"}
}
}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/with-literal-string.toml 0000664 0000000 0000000 00000000051 15130702260 0032541 0 ustar 00root root 0000000 0000000 ['a']
[a.'"b"']
[a.'"b"'.c]
answer = 42
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/with-pound.json 0000664 0000000 0000000 00000000122 15130702260 0030723 0 ustar 00root root 0000000 0000000 {
"key#group": {
"answer": {"type": "integer", "value": "42"}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/with-pound.toml 0000664 0000000 0000000 00000000032 15130702260 0030725 0 ustar 00root root 0000000 0000000 ["key#group"]
answer = 42
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/with-single-quotes.json 0000664 0000000 0000000 00000000214 15130702260 0032377 0 ustar 00root root 0000000 0000000 {
"a": {
"b": {
"c": {
"answer": {"type": "integer", "value": "42"}
}
}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/with-single-quotes.toml 0000664 0000000 0000000 00000000045 15130702260 0032403 0 ustar 00root root 0000000 0000000 ['a']
[a.'b']
[a.'b'.c]
answer = 42
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/without-super-with-values.json0000664 0000000 0000000 00000000517 15130702260 0033742 0 ustar 00root root 0000000 0000000 {
"x": {
"c": {"type": "integer", "value": "3"},
"d": {"type": "integer", "value": "4"},
"y": {
"z": {
"w": {
"a": {"type": "integer", "value": "1"},
"b": {"type": "integer", "value": "2"}
}
}
}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/without-super-with-values.toml0000664 0000000 0000000 00000000220 15130702260 0033733 0 ustar 00root root 0000000 0000000 # [x] you
# [x.y] don't
# [x.y.z] need these
[x.y.z.w] # for this to work
a = 1
b = 2
[x] # defining a super-table afterwards is ok
c = 3
d = 4
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/without-super.json 0000664 0000000 0000000 00000000147 15130702260 0031473 0 ustar 00root root 0000000 0000000 {
"x": {
"y": {
"z": {
"w": {}
}
}
}
}
hukkin-tomli-7940ff4/tests/data/valid/_external/toml-test/valid/table/without-super.toml 0000664 0000000 0000000 00000000170 15130702260 0031471 0 ustar 00root root 0000000 0000000 # [x] you
# [x.y] don't
# [x.y.z] need these
[x.y.z.w] # for this to work
[x] # defining a super-table afterwards is ok
hukkin-tomli-7940ff4/tests/data/valid/apostrophes-in-literal-string.json 0000664 0000000 0000000 00000000144 15130702260 0026443 0 ustar 00root root 0000000 0000000 {"this-str-has-apostrophes": {"type": "string", "value": "' there's one already\n'' two more\n''"}}
hukkin-tomli-7940ff4/tests/data/valid/apostrophes-in-literal-string.toml 0000664 0000000 0000000 00000000104 15130702260 0026441 0 ustar 00root root 0000000 0000000 this-str-has-apostrophes='''' there's one already
'' two more
'''''
hukkin-tomli-7940ff4/tests/data/valid/array/ 0000775 0000000 0000000 00000000000 15130702260 0020756 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/valid/array/array-subtables.json 0000664 0000000 0000000 00000000302 15130702260 0024744 0 ustar 00root root 0000000 0000000 {"arr":
{"type":"array","value":
[
{"subtab":
{"val": {"type":"integer","value":"1"}
}
},
{"subtab": {"val": {"type":"integer","value":"2"}}}
]
}
}
hukkin-tomli-7940ff4/tests/data/valid/array/array-subtables.toml 0000664 0000000 0000000 00000000067 15130702260 0024756 0 ustar 00root root 0000000 0000000 [[arr]]
[arr.subtab]
val=1
[[arr]]
[arr.subtab]
val=2
hukkin-tomli-7940ff4/tests/data/valid/array/open-parent-table.json 0000664 0000000 0000000 00000000167 15130702260 0025172 0 ustar 00root root 0000000 0000000 {
"parent-table": {
"arr": {"type":"array","value":[{},{}]},
"not-arr": {"type":"integer","value":"1"}
}
}
hukkin-tomli-7940ff4/tests/data/valid/array/open-parent-table.toml 0000664 0000000 0000000 00000000105 15130702260 0025164 0 ustar 00root root 0000000 0000000 [[parent-table.arr]]
[[parent-table.arr]]
[parent-table]
not-arr = 1
hukkin-tomli-7940ff4/tests/data/valid/boolean.json 0000664 0000000 0000000 00000000122 15130702260 0022145 0 ustar 00root root 0000000 0000000 {
"a": {"type":"bool","value":"true"},
"b": {"type":"bool","value":"false"}
}
hukkin-tomli-7940ff4/tests/data/valid/boolean.toml 0000664 0000000 0000000 00000000022 15130702260 0022146 0 ustar 00root root 0000000 0000000 'a'=true
"b"=false hukkin-tomli-7940ff4/tests/data/valid/dates-and-times/ 0000775 0000000 0000000 00000000000 15130702260 0022617 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/valid/dates-and-times/datetimes.json 0000664 0000000 0000000 00000000335 15130702260 0025472 0 ustar 00root root 0000000 0000000 {
"local-dt": {"type":"datetime-local","value":"1988-10-27t01:01:01"},
"local-dt-no-seconds": {"type":"datetime-local","value":"2025-04-18t20:05:00"},
"zulu-dt": {"type":"datetime","value":"1988-10-27t01:01:01z"}
}
hukkin-tomli-7940ff4/tests/data/valid/dates-and-times/datetimes.toml 0000664 0000000 0000000 00000000137 15130702260 0025474 0 ustar 00root root 0000000 0000000 local-dt=1988-10-27t01:01:01
local-dt-no-seconds=2025-04-18T20:05
zulu-dt=1988-10-27t01:01:01z
hukkin-tomli-7940ff4/tests/data/valid/dates-and-times/localtime.json 0000664 0000000 0000000 00000000153 15130702260 0025462 0 ustar 00root root 0000000 0000000 {"t":
{"type":"time-local","value":"00:00:00.999999"},
"t2":
{"type":"time-local","value":"00:00:00"}}
hukkin-tomli-7940ff4/tests/data/valid/dates-and-times/localtime.toml 0000664 0000000 0000000 00000000042 15130702260 0025461 0 ustar 00root root 0000000 0000000 t=00:00:00.99999999999999
t2=00:00 hukkin-tomli-7940ff4/tests/data/valid/five-quotes.json 0000664 0000000 0000000 00000000233 15130702260 0023000 0 ustar 00root root 0000000 0000000 {
"five-quotes": {"type":"string","value":"Closing with five quotes\n\"\""},
"four-quotes": {"type":"string","value":"Closing with four quotes\n\""}
}
hukkin-tomli-7940ff4/tests/data/valid/five-quotes.toml 0000664 0000000 0000000 00000000141 15130702260 0023000 0 ustar 00root root 0000000 0000000 five-quotes = """
Closing with five quotes
"""""
four-quotes = """
Closing with four quotes
""""
hukkin-tomli-7940ff4/tests/data/valid/hex-char.json 0000664 0000000 0000000 00000000165 15130702260 0022234 0 ustar 00root root 0000000 0000000 {
"a": {"type":"string","value":"a"},
"b": {"type":"string","value":"b"},
"c": {"type":"string","value":"c"}
}
hukkin-tomli-7940ff4/tests/data/valid/hex-char.toml 0000664 0000000 0000000 00000000044 15130702260 0022232 0 ustar 00root root 0000000 0000000 a="\u0061"
b="\u0062"
c="\U00000063" hukkin-tomli-7940ff4/tests/data/valid/inline-table/ 0000775 0000000 0000000 00000000000 15130702260 0022203 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/valid/inline-table/empty-inline-table.json 0000664 0000000 0000000 00000000016 15130702260 0026572 0 ustar 00root root 0000000 0000000 {"empty": {}} hukkin-tomli-7940ff4/tests/data/valid/inline-table/empty-inline-table.toml 0000664 0000000 0000000 00000000043 15130702260 0026574 0 ustar 00root root 0000000 0000000 empty ={ }#nothing here
hukkin-tomli-7940ff4/tests/data/valid/inline-table/multiline-inline-table.json 0000664 0000000 0000000 00000000760 15130702260 0027444 0 ustar 00root root 0000000 0000000 {
"multiline": {
"a": {
"type": "integer",
"value": "1"
},
"b": {
"type": "integer",
"value": "2"
},
"c": [
{
"type": "integer",
"value": "1"
},
{
"type": "integer",
"value": "2"
},
{
"type": "integer",
"value": "3"
}
],
"d": {
"type": "integer",
"value": "3"
},
"e": {
"type": "integer",
"value": "4"
},
"f": {}
}
} hukkin-tomli-7940ff4/tests/data/valid/inline-table/multiline-inline-table.toml 0000664 0000000 0000000 00000000234 15130702260 0027442 0 ustar 00root root 0000000 0000000 multiline = {
"a" = 1, "b" = 2,
c = [
1,
2,
3,
],# comment
d = 3,
e = 4, f = {
# comment
},
}
hukkin-tomli-7940ff4/tests/data/valid/multiline-basic-str/ 0000775 0000000 0000000 00000000000 15130702260 0023527 5 ustar 00root root 0000000 0000000 hukkin-tomli-7940ff4/tests/data/valid/multiline-basic-str/ends-in-whitespace-escape.json 0000664 0000000 0000000 00000000066 15130702260 0031351 0 ustar 00root root 0000000 0000000 {"beee": {"type": "string", "value": "heeee\ngeeee"}}
hukkin-tomli-7940ff4/tests/data/valid/multiline-basic-str/ends-in-whitespace-escape.toml 0000664 0000000 0000000 00000000046 15130702260 0031351 0 ustar 00root root 0000000 0000000 beee = """
heeee
geeee\
"""
hukkin-tomli-7940ff4/tests/data/valid/multiline-basic-str/replacements.json 0000664 0000000 0000000 00000000266 15130702260 0027110 0 ustar 00root root 0000000 0000000 {
"escape": {"type":"string","value":"\u001B"},
"tab": {"type":"string","value":"\t"},
"upper-j": {"type":"string","value":"J"},
"upper-j-2": {"type":"string","value":"J"}
}
hukkin-tomli-7940ff4/tests/data/valid/multiline-basic-str/replacements.toml 0000664 0000000 0000000 00000000077 15130702260 0027112 0 ustar 00root root 0000000 0000000 escape = "\e"
tab = "\x09"
upper-j = "\x4a"
upper-j-2 = "\x4A"
hukkin-tomli-7940ff4/tests/data/valid/no-newlines.json 0000664 0000000 0000000 00000000003 15130702260 0022762 0 ustar 00root root 0000000 0000000 {}
hukkin-tomli-7940ff4/tests/data/valid/no-newlines.toml 0000664 0000000 0000000 00000000030 15130702260 0022764 0 ustar 00root root 0000000 0000000 #no newlines at all here hukkin-tomli-7940ff4/tests/data/valid/trailing-comma.json 0000664 0000000 0000000 00000000132 15130702260 0023432 0 ustar 00root root 0000000 0000000 {"arr":
{"type":"array","value":
[
{"type":"integer","value":"1"}
]
}
}
hukkin-tomli-7940ff4/tests/data/valid/trailing-comma.toml 0000664 0000000 0000000 00000000010 15130702260 0023427 0 ustar 00root root 0000000 0000000 arr=[1,] hukkin-tomli-7940ff4/tests/test_data.py 0000664 0000000 0000000 00000003231 15130702260 0020151 0 ustar 00root root 0000000 0000000 # SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
# Licensed to PSF under a Contributor Agreement.
import json
from pathlib import Path
import unittest
from . import burntsushi, tomllib
DATA_DIR = Path(__file__).parent / "data"
VALID_FILES = tuple((DATA_DIR / "valid").glob("**/*.toml"))
assert VALID_FILES, "Valid TOML test files not found"
_expected_files = []
for p in VALID_FILES:
json_path = p.with_suffix(".json")
text = json.loads(json_path.read_bytes().decode())
_expected_files.append(text)
VALID_FILES_EXPECTED = tuple(_expected_files)
INVALID_FILES = tuple((DATA_DIR / "invalid").glob("**/*.toml"))
assert INVALID_FILES, "Invalid TOML test files not found"
class TestData(unittest.TestCase):
def test_invalid(self):
for invalid in INVALID_FILES:
with self.subTest(msg=invalid.stem):
toml_bytes = invalid.read_bytes()
try:
toml_str = toml_bytes.decode()
except UnicodeDecodeError:
# Some BurntSushi tests are not valid UTF-8. Skip those.
continue
with self.assertRaises(tomllib.TOMLDecodeError):
tomllib.loads(toml_str)
def test_valid(self):
for valid, expected in zip(VALID_FILES, VALID_FILES_EXPECTED):
with self.subTest(msg=valid.stem):
toml_str = valid.read_bytes().decode()
actual = tomllib.loads(toml_str)
actual = burntsushi.convert(actual) # type: ignore[no-untyped-call]
expected = burntsushi.normalize(expected)
self.assertEqual(actual, expected)
hukkin-tomli-7940ff4/tests/test_error.py 0000664 0000000 0000000 00000007414 15130702260 0020400 0 ustar 00root root 0000000 0000000 # SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
# Licensed to PSF under a Contributor Agreement.
from __future__ import annotations
from typing import Any
import unittest
from . import tomllib
class TestError(unittest.TestCase):
def test_line_and_col(self):
with self.assertRaises(tomllib.TOMLDecodeError) as exc_info:
tomllib.loads("val=.")
self.assertEqual(str(exc_info.exception), "Invalid value (at line 1, column 5)")
with self.assertRaises(tomllib.TOMLDecodeError) as exc_info:
tomllib.loads(".")
self.assertEqual(
str(exc_info.exception), "Invalid statement (at line 1, column 1)"
)
with self.assertRaises(tomllib.TOMLDecodeError) as exc_info:
tomllib.loads("\n\nval=.")
self.assertEqual(str(exc_info.exception), "Invalid value (at line 3, column 5)")
with self.assertRaises(tomllib.TOMLDecodeError) as exc_info:
tomllib.loads("\n\n.")
self.assertEqual(
str(exc_info.exception), "Invalid statement (at line 3, column 1)"
)
def test_missing_value(self):
with self.assertRaises(tomllib.TOMLDecodeError) as exc_info:
tomllib.loads("\n\nfwfw=")
self.assertEqual(str(exc_info.exception), "Invalid value (at end of document)")
def test_invalid_char_quotes(self):
with self.assertRaises(tomllib.TOMLDecodeError) as exc_info:
tomllib.loads("v = '\n'")
self.assertTrue(" '\\n' " in str(exc_info.exception))
def test_type_error(self):
with self.assertRaises(TypeError) as exc_info:
tomllib.loads(b"v = 1") # type: ignore[arg-type]
# Mypyc extension leads to different message than pure Python
self.assertIn(
str(exc_info.exception),
("Expected str object, not 'bytes'", "str object expected; got bytes"),
)
with self.assertRaises(TypeError) as exc_info:
tomllib.loads(False) # type: ignore[arg-type]
# Mypyc extension leads to different message than pure Python
self.assertIn(
str(exc_info.exception),
("Expected str object, not 'bool'", "str object expected; got bool"),
)
def test_invalid_parse_float(self):
def dict_returner(s: str) -> dict[Any, Any]:
return {}
def list_returner(s: str) -> list[Any]:
return []
for invalid_parse_float in (dict_returner, list_returner):
with self.assertRaises(ValueError) as exc_info:
tomllib.loads("f=0.1", parse_float=invalid_parse_float)
self.assertEqual(
str(exc_info.exception), "parse_float must not return dicts or lists"
)
def test_deprecated_tomldecodeerror(self):
for args in [
(),
("err msg",),
(None,),
(None, "doc"),
("err msg", None),
(None, "doc", None),
("err msg", "doc", None),
("one", "two", "three", "four"),
("one", "two", 3, "four", "five"),
]:
with self.assertWarns(DeprecationWarning):
e = tomllib.TOMLDecodeError(*args) # type: ignore[arg-type]
self.assertEqual(e.args, args)
def test_tomldecodeerror(self):
msg = "error parsing"
doc = "v=1\n[table]\nv='val'"
pos = 13
formatted_msg = "error parsing (at line 3, column 2)"
e = tomllib.TOMLDecodeError(msg, doc, pos)
self.assertEqual(e.args, (formatted_msg,))
self.assertEqual(str(e), formatted_msg)
self.assertEqual(e.msg, msg)
self.assertEqual(e.doc, doc)
self.assertEqual(e.pos, pos)
self.assertEqual(e.lineno, 3)
self.assertEqual(e.colno, 2)
hukkin-tomli-7940ff4/tests/test_misc.py 0000664 0000000 0000000 00000011145 15130702260 0020176 0 ustar 00root root 0000000 0000000 # SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
# Licensed to PSF under a Contributor Agreement.
import copy
import datetime
from decimal import Decimal as D
import importlib
from pathlib import Path
import sys
import tempfile
import unittest
from . import tomllib
class TestMiscellaneous(unittest.TestCase):
def test_load(self):
content = "one=1 \n two='two' \n arr=[]"
expected = {"one": 1, "two": "two", "arr": []}
with tempfile.TemporaryDirectory() as tmp_dir_path:
file_path = Path(tmp_dir_path) / "test.toml"
file_path.write_text(content)
with open(file_path, "rb") as bin_f:
actual = tomllib.load(bin_f)
self.assertEqual(actual, expected)
def test_incorrect_load(self):
content = "one=1"
with tempfile.TemporaryDirectory() as tmp_dir_path:
file_path = Path(tmp_dir_path) / "test.toml"
file_path.write_text(content)
with open(file_path, "r") as txt_f:
with self.assertRaises(TypeError) as exc_info:
tomllib.load(txt_f) # type: ignore[arg-type]
# Mypyc extension leads to different message than pure Python
self.assertIn(
str(exc_info.exception),
(
"File must be opened in binary mode, e.g. use `open('foo.toml', 'rb')`", # noqa: E501
"bytes object expected; got str",
),
)
def test_parse_float(self):
doc = """
val=0.1
biggest1=inf
biggest2=+inf
smallest=-inf
notnum1=nan
notnum2=-nan
notnum3=+nan
"""
obj = tomllib.loads(doc, parse_float=D)
expected = {
"val": D("0.1"),
"biggest1": D("inf"),
"biggest2": D("inf"),
"smallest": D("-inf"),
"notnum1": D("nan"),
"notnum2": D("-nan"),
"notnum3": D("nan"),
}
for k, expected_val in expected.items():
actual_val = obj[k]
self.assertIsInstance(actual_val, D)
if actual_val.is_nan():
self.assertTrue(expected_val.is_nan())
else:
self.assertEqual(actual_val, expected_val)
def test_deepcopy(self):
doc = """
[bliibaa.diibaa]
offsettime=[1979-05-27T00:32:00.999999-07:00]
"""
obj = tomllib.loads(doc)
obj_copy = copy.deepcopy(obj)
self.assertEqual(obj_copy, obj)
expected_obj = {
"bliibaa": {
"diibaa": {
"offsettime": [
datetime.datetime(
1979,
5,
27,
0,
32,
0,
999999,
tzinfo=datetime.timezone(datetime.timedelta(hours=-7)),
)
]
}
}
}
self.assertEqual(obj_copy, expected_obj)
def test_inline_array_recursion_limit(self):
nest_count = 470
recursive_array_toml = "arr = " + nest_count * "[" + nest_count * "]"
tomllib.loads(recursive_array_toml)
nest_count = sys.getrecursionlimit() + 2
recursive_array_toml = "arr = " + nest_count * "[" + nest_count * "]"
with self.assertRaisesRegex(
RecursionError,
r"maximum recursion depth exceeded"
r"|"
r"TOML inline arrays/tables are nested more than the allowed [0-9]+ levels",
):
tomllib.loads(recursive_array_toml)
def test_inline_table_recursion_limit(self):
nest_count = 310
recursive_table_toml = nest_count * "key = {" + nest_count * "}"
tomllib.loads(recursive_table_toml)
nest_count = sys.getrecursionlimit() + 2
recursive_table_toml = nest_count * "key = {" + nest_count * "}"
with self.assertRaisesRegex(
RecursionError,
r"maximum recursion depth exceeded"
r"|"
r"TOML inline arrays/tables are nested more than the allowed [0-9]+ levels",
):
tomllib.loads(recursive_table_toml)
def test_types_import(self):
"""Test that `_types` module runs.
The module is for type annotations only, so it is otherwise
never imported by tests.
"""
importlib.import_module(f"{tomllib.__name__}._types")
hukkin-tomli-7940ff4/tomllib.md 0000664 0000000 0000000 00000003360 15130702260 0016454 0 ustar 00root root 0000000 0000000 # `tomllib` – Tomli in the standard library
Tomli was added to the Python standard library in Python 3.11.
Relevant links:
- Python Issue Tracker: https://bugs.python.org/issue40059
- Tomli issue tracker: https://github.com/hukkin/tomli/issues/141
- Discussion on PyPA "blessing" a TOML parser and/or including one in the standard library: https://discuss.python.org/t/adopting-recommending-a-toml-parser/4068
- Python Enhancement Proposal: https://peps.python.org/pep-0680
- CPython pull request: https://github.com/python/cpython/pull/31498
## Converting Tomli to tomllib
### Sync status
`tomllib` in CPython commit https://github.com/python/cpython/commit/deaf509e8fc6e0363bd6f26d52ad42f976ec42f2
matches Tomli commit https://github.com/hukkin/tomli/commit/7e563eed5286b5d46b8290a9f56a86d955b23a9a
### Steps to convert
- Move everything in `tomli:src/tomli` to `cpython:Lib/tomllib`. Exclude `py.typed`.
- Remove `__version__ = ...` line from `cpython:Lib/tomllib/__init__.py`
- Move everything in `tomli:tests` to `cpython:Lib/test/test_tomllib`. Exclude the following test data dirs recursively:
- `tomli:tests/data/invalid/_external/`
- `tomli:tests/data/valid/_external/`
- Create `cpython:Lib/test/test_tomllib/__main__.py`:
```python
import unittest
from . import load_tests
unittest.main()
```
- Add the following to `cpython:Lib/test/test_tomllib/__init__.py`:
```python
import os
from test.support import load_package_tests
def load_tests(*args):
return load_package_tests(os.path.dirname(__file__), *args)
```
Also change `import tomli as tomllib` to `import tomllib`.
- In `cpython:Lib/tomllib/_parser.py` replace `__fp` with `fp` and `__s` with `s`. Add the `/` to `load` and `loads` function signatures.