pax_global_header 0000666 0000000 0000000 00000000064 15261432440 0014513 g ustar 00root root 0000000 0000000 52 comment=a2a578949199336ebc3884eeba4aede87da41ef2
hukkin-tomli-b3b679b/ 0000775 0000000 0000000 00000000000 15261432440 0014546 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/.bumpversion.cfg 0000664 0000000 0000000 00000000707 15261432440 0017662 0 ustar 00root root 0000000 0000000 [bumpversion]
commit = True
tag = True
tag_name = {new_version}
current_version = 2.5.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-b3b679b/.flake8 0000664 0000000 0000000 00000000456 15261432440 0015726 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/*
builtins-allowed-modules =
# Allow tomli/_types.py
_types,
hukkin-tomli-b3b679b/.github/ 0000775 0000000 0000000 00000000000 15261432440 0016106 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/.github/workflows/ 0000775 0000000 0000000 00000000000 15261432440 0020143 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/.github/workflows/tests.yaml 0000664 0000000 0000000 00000012062 15261432440 0022172 0 ustar 00root root 0000000 0000000 name: Tests
on:
push:
branches: [ master ]
tags: [ '[0-9]+.[0-9]+.[0-9]+*' ]
pull_request:
branches: [ master ]
permissions: {}
env:
CIBW_TEST_COMMAND: python -m unittest discover --start-directory {project}
CIBW_SKIP: 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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
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 --show-missing
- name: Report coverage
uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
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@adba99c781d3746d38b3a09b1cf797965bcb7fe6 # v4.3.0
env:
CIBW_ARCHS_MACOS: x86_64 arm64
TOMLI_USE_MYPYC: '1'
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Install build dependencies
run: pip install build
- name: Build
run: python -m build
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
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
permissions:
# This permission is mandatory for Trusted Publishing
id-token: write
steps:
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
path: dist
pattern: artifact-*
merge-multiple: true
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
hukkin-tomli-b3b679b/.gitignore 0000664 0000000 0000000 00000003456 15261432440 0016546 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-b3b679b/.pre-commit-config.yaml 0000664 0000000 0000000 00000004162 15261432440 0021032 0 ustar 00root root 0000000 0000000 repos:
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: ad1b27d73581aa16cca06fc4a0761fc563ffe8e8 # frozen: v1.5.6
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: 9f905615631c545f5aea2516508109350d1d2f7d # frozen: 9.0.2
hooks:
- id: isort
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 96ae3e5802f3fe2d551e703e18f0a367d1a81ac2 # frozen: 26.10.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: cfbbfdeb2391c14a37e101e92a77f54f329e1726 # frozen: 7.4.1
hooks:
- id: flake8
additional_dependencies:
- flake8-bugbear
- flake8-builtins
- flake8-comprehensions
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 2834ec6639549dd6796205c8f011dedcd587288b # frozen: v2.4.0
hooks:
- id: mypy
args: ["--scripts-are-modules"]
- repo: https://github.com/zizmorcore/zizmor-pre-commit
rev: fa412071e4f5d44d44f9e365f4676f9df92456a2 # frozen: v1.30.1
hooks:
- id: zizmor
hukkin-tomli-b3b679b/CHANGELOG.md 0000664 0000000 0000000 00000013367 15261432440 0016371 0 ustar 00root root 0000000 0000000 # Changelog
## 2.5.0
- Added
- Binary wheels for Python 3.15
- Fixed
- Set nested inline array/table limit to 400 to fix mypyc generated binaries crashing unrecoverably in `python:3.13-alpine` image's worker thread
## 2.3.1
- Fixed
- Backport: Limit number of parts of a TOML key to address quadratic time complexity
## 2.4.1
- Fixed
- Limit number of parts of a TOML key to address quadratic time complexity
## 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-b3b679b/LICENSE 0000664 0000000 0000000 00000002060 15261432440 0015551 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-b3b679b/LICENSE-HEADER 0000664 0000000 0000000 00000000171 15261432440 0016500 0 ustar 00root root 0000000 0000000 SPDX-License-Identifier: MIT
SPDX-FileCopyrightText: 2021 Taneli Hukkinen
Licensed to PSF under a Contributor Agreement.
hukkin-tomli-b3b679b/MANIFEST.in 0000664 0000000 0000000 00000000015 15261432440 0016300 0 ustar 00root root 0000000 0000000 prune tests/
hukkin-tomli-b3b679b/README.md 0000664 0000000 0000000 00000022422 15261432440 0016027 0 ustar 00root root 0000000 0000000 [](https://github.com/hukkin/tomli/actions?query=workflow%3ATests+branch%3Amaster+event%3Apush)
[](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)
- [Mypyc generated wheel](#mypyc-generated-wheel)
- [Pure Python](#pure-python)
## 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 provides a TOML v1.1.0 compatible backport for Pythons older than 3.15.
On the other hand, installing `tomli<2.4` allows TOML v1.0.0 parsing on Python 3.15+.
Tomli uses [mypyc](https://github.com/mypyc/mypyc)
to generate binary wheels for most of the widely used platforms,
so some 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):
14x 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 [064e492](https://github.com/hukkin/tomli/tree/064e492919b2338def788753b8c981c9131334c0).
### Mypyc generated wheel
```console
foo@bar:~/dev/tomli$ python --version
Python 3.14.2
foo@bar:~/dev/tomli$ pip freeze
pytomlpp==1.1.0
rtoml==0.13.0
toml==0.10.2
tomli @ file:///home/foo/dev/tomli
tomlkit==0.13.3
foo@bar:~/dev/tomli$ python benchmark/run.py
Parsing data.toml 5000 times:
------------------------------------------------------
parser | exec time | performance (more is better)
-----------+------------+-----------------------------
rtoml | 0.328 s | baseline (100%)
pytomlpp | 0.365 s | 89.75%
tomli | 0.838 s | 39.12%
toml | 3.01 s | 10.90%
tomlkit | 20.7 s | 1.59%
```
### Pure Python
```console
foo@bar:~/dev/tomli$ python benchmark/run.py
Parsing data.toml 5000 times:
------------------------------------------------------
parser | exec time | performance (more is better)
-----------+------------+-----------------------------
rtoml | 0.323 s | baseline (100%)
pytomlpp | 0.365 s | 88.40%
tomli | 1.44 s | 22.36%
toml | 3.03 s | 10.65%
tomlkit | 20.6 s | 1.57%
```
hukkin-tomli-b3b679b/benchmark/ 0000775 0000000 0000000 00000000000 15261432440 0016500 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/benchmark/LICENSE 0000664 0000000 0000000 00000002150 15261432440 0017503 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-b3b679b/benchmark/README.md 0000664 0000000 0000000 00000000626 15261432440 0017763 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-b3b679b/benchmark/data.toml 0000664 0000000 0000000 00000007665 15261432440 0020324 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-b3b679b/benchmark/requirements.txt 0000664 0000000 0000000 00000000271 15261432440 0021764 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
rtoml
hukkin-tomli-b3b679b/benchmark/run.py 0000664 0000000 0000000 00000004067 15261432440 0017665 0 ustar 00root root 0000000 0000000 from __future__ import annotations
from collections.abc import Callable
from pathlib import Path
import timeit
import pytomlpp
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 = min(timeit.repeat(func, number=run_count, repeat=5))
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()
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("tomlkit", run_count, lambda: tomlkit.parse(test_data), col_width, compare_to=baseline) # noqa: E501
# fmt: on
if __name__ == "__main__":
run(5000)
hukkin-tomli-b3b679b/fuzzer/ 0000775 0000000 0000000 00000000000 15261432440 0016073 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/fuzzer/fuzz.py 0000664 0000000 0000000 00000004124 15261432440 0017444 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-b3b679b/fuzzer/requirements.txt 0000664 0000000 0000000 00000000101 15261432440 0021347 0 ustar 00root root 0000000 0000000 # sudo apt-get install clang
wheel
atheris==2.0.7
tomli_w>=0.2.2
hukkin-tomli-b3b679b/profiler/ 0000775 0000000 0000000 00000000000 15261432440 0016370 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/profiler/profiler_script.py 0000664 0000000 0000000 00000000613 15261432440 0022150 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-b3b679b/profiler/requirements.txt 0000664 0000000 0000000 00000000012 15261432440 0021645 0 ustar 00root root 0000000 0000000 gprof2dot
hukkin-tomli-b3b679b/pyproject.toml 0000664 0000000 0000000 00000011732 15261432440 0017466 0 ustar 00root root 0000000 0000000 [build-system]
requires = ["flit_core>=3.12,<5"]
build-backend = "flit_core.buildapi"
[project]
name = "tomli"
version = "2.5.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-b3b679b/scripts/ 0000775 0000000 0000000 00000000000 15261432440 0016235 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/scripts/mypyc_tox 0000775 0000000 0000000 00000002016 15261432440 0020215 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-b3b679b/scripts/requirements.txt 0000664 0000000 0000000 00000000010 15261432440 0021510 0 ustar 00root root 0000000 0000000 tomli-w
hukkin-tomli-b3b679b/scripts/use_setuptools.py 0000664 0000000 0000000 00000001206 15261432440 0021703 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-b3b679b/setup.py 0000664 0000000 0000000 00000000477 15261432440 0016270 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-b3b679b/src/ 0000775 0000000 0000000 00000000000 15261432440 0015335 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/src/tomli/ 0000775 0000000 0000000 00000000000 15261432440 0016461 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/src/tomli/__init__.py 0000664 0000000 0000000 00000000472 15261432440 0020575 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.5.0" # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT
from ._parser import TOMLDecodeError, load, loads
hukkin-tomli-b3b679b/src/tomli/_parser.py 0000664 0000000 0000000 00000064147 15261432440 0020502 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
# Defer loading regular expressions until we actually need them in
# parse_value().
__lazy_modules__ = ["tomli._re", "tomllib._re"]
import sys
from ._re import (
RE_DATETIME,
RE_LOCALTIME,
RE_NUMBER,
match_to_datetime,
match_to_localtime,
match_to_number,
)
if sys.version_info < (3, 15): # pragma: no cover
from types import MappingProxyType as frozendict
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 400 as maximum inline table/array nesting level, as it's 4x the
# spec recommended minimum (https://github.com/toml-lang/toml/pull/1087)
# (unreleased at the time of writing) and less than half of what causes an
# unrecoverable crash in a worker (not main) thread on a python:3.13-alpine
# image.
MAX_INLINE_NESTING: Final = 400
# Pathologically excessive number of parts in a key runs into quadratic
# behavior (e.g. in Flags.is_).
# Even if keys aren't currently parsed using recursion, they name a
# recursive structure, so it makes sense to limit it using getrecursionlimit()
# and RecursionError.
MAX_KEY_PARTS: 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 = frozendict(
{
"\\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,)
if len(key) > MAX_KEY_PARTS:
raise RecursionError(
f"TOML key has more than the allowed {MAX_KEY_PARTS} parts"
)
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-b3b679b/src/tomli/_re.py 0000664 0000000 0000000 00000006504 15261432440 0017605 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-b3b679b/src/tomli/_types.py 0000664 0000000 0000000 00000000376 15261432440 0020344 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-b3b679b/src/tomli/py.typed 0000664 0000000 0000000 00000000032 15261432440 0020153 0 ustar 00root root 0000000 0000000 # Marker file for PEP 561
hukkin-tomli-b3b679b/tests/ 0000775 0000000 0000000 00000000000 15261432440 0015710 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/__init__.py 0000664 0000000 0000000 00000000405 15261432440 0020020 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-b3b679b/tests/burntsushi.py 0000664 0000000 0000000 00000006144 15261432440 0020475 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-b3b679b/tests/data/ 0000775 0000000 0000000 00000000000 15261432440 0016621 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/ 0000775 0000000 0000000 00000000000 15261432440 0020247 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/ 0000775 0000000 0000000 00000000000 15261432440 0022230 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/ 0000775 0000000 0000000 00000000000 15261432440 0024160 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/LICENSE 0000664 0000000 0000000 00000002067 15261432440 0025172 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-b3b679b/tests/data/invalid/_external/toml-test/invalid/ 0000775 0000000 0000000 00000000000 15261432440 0025606 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/array/ 0000775 0000000 0000000 00000000000 15261432440 0026724 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/array/double-comma-01.toml 0000664 0000000 0000000 00000000031 15261432440 0032375 0 ustar 00root root 0000000 0000000 double-comma-01 = [1,,2]
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/array/double-comma-02.toml 0000664 0000000 0000000 00000000032 15261432440 0032377 0 ustar 00root root 0000000 0000000 double-comma-02 = [1,2,,]
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/array/extend-defined-aot.toml 0000664 0000000 0000000 00000000035 15261432440 0033263 0 ustar 00root root 0000000 0000000 [[tab.arr]]
[tab]
arr.val1=1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/array/extending-table.toml 0000664 0000000 0000000 00000000172 15261432440 0032673 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-b3b679b/tests/data/invalid/_external/toml-test/invalid/array/missing-separator-01.toml 0000664 0000000 0000000 00000000024 15261432440 0033502 0 ustar 00root root 0000000 0000000 arrr = [true false]
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/array/missing-separator-02.toml 0000664 0000000 0000000 00000000022 15261432440 0033501 0 ustar 00root root 0000000 0000000 wrong = [ 1 2 3 ]
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/array/no-close-01.toml 0000664 0000000 0000000 00000000030 15261432440 0031547 0 ustar 00root root 0000000 0000000 no-close-01 = [ 1, 2, 3
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/array/no-close-02.toml 0000664 0000000 0000000 00000000022 15261432440 0031551 0 ustar 00root root 0000000 0000000 no-close-02 = [1,
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/array/no-close-03.toml 0000664 0000000 0000000 00000000025 15261432440 0031555 0 ustar 00root root 0000000 0000000 no-close-03 = [42 #]
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/array/no-close-04.toml 0000664 0000000 0000000 00000000032 15261432440 0031554 0 ustar 00root root 0000000 0000000 no-close-04 = [{ key = 42
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/array/no-close-05.toml 0000664 0000000 0000000 00000000033 15261432440 0031556 0 ustar 00root root 0000000 0000000 no-close-05 = [{ key = 42}
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/array/no-close-06.toml 0000664 0000000 0000000 00000000036 15261432440 0031562 0 ustar 00root root 0000000 0000000 no-close-06 = [{ key = 42 #}]
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/array/no-close-07.toml 0000664 0000000 0000000 00000000036 15261432440 0031563 0 ustar 00root root 0000000 0000000 no-close-07 = [{ key = 42} #]
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/array/no-close-08.toml 0000664 0000000 0000000 00000000020 15261432440 0031555 0 ustar 00root root 0000000 0000000 no-close-08 = [
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/array/no-close-table-01.toml 0000664 0000000 0000000 00000000020 15261432440 0032633 0 ustar 00root root 0000000 0000000 x = [{ key = 42
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/array/no-close-table-02.toml 0000664 0000000 0000000 00000000022 15261432440 0032636 0 ustar 00root root 0000000 0000000 x = [{ key = 42 #
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/array/no-comma-01.toml 0000664 0000000 0000000 00000000033 15261432440 0031541 0 ustar 00root root 0000000 0000000 no-comma-01 = [true false]
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/array/no-comma-02.toml 0000664 0000000 0000000 00000000030 15261432440 0031537 0 ustar 00root root 0000000 0000000 no-comma-02 = [ 1 2 3 ]
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/array/no-comma-03.toml 0000664 0000000 0000000 00000000026 15261432440 0031545 0 ustar 00root root 0000000 0000000 no-comma-03 = [ 1 #,]
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/array/only-comma-01.toml 0000664 0000000 0000000 00000000024 15261432440 0032106 0 ustar 00root root 0000000 0000000 only-comma-01 = [,]
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/array/only-comma-02.toml 0000664 0000000 0000000 00000000025 15261432440 0032110 0 ustar 00root root 0000000 0000000 only-comma-02 = [,,]
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/array/tables-01.toml 0000664 0000000 0000000 00000000067 15261432440 0031314 0 ustar 00root root 0000000 0000000 # INVALID TOML DOC
fruit = []
[[fruit]] # Not allowed
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/array/tables-02.toml 0000664 0000000 0000000 00000000274 15261432440 0031315 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 15261432440 0034405 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/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 15261432440 0035076 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/array array = [
"Is there life before an array separator?" No,
"Entry"
]
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/array/text-in-array.toml 0000664 0000000 0000000 00000000070 15261432440 0032322 0 ustar 00root root 0000000 0000000 array = [
"Entry 1",
I don't belong,
"Entry 2",
]
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/bool/ 0000775 0000000 0000000 00000000000 15261432440 0026541 5 ustar 00root root 0000000 0000000 almost-false-with-extra.toml 0000664 0000000 0000000 00000000042 15261432440 0034034 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/bool almost-false-with-extra = falsify
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/bool/almost-false.toml 0000664 0000000 0000000 00000000037 15261432440 0032025 0 ustar 00root root 0000000 0000000 almost-false = fals
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/bool/almost-true-with-extra.toml0000664 0000000 0000000 00000000041 15261432440 0033777 0 ustar 00root root 0000000 0000000 almost-true-with-extra = truthy
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/bool/almost-true.toml 0000664 0000000 0000000 00000000036 15261432440 0031711 0 ustar 00root root 0000000 0000000 almost-true = tru
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/bool/capitalized-false.toml 0000664 0000000 0000000 00000000041 15261432440 0033012 0 ustar 00root root 0000000 0000000 capitalized-false = False
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/bool/capitalized-true.toml 0000664 0000000 0000000 00000000040 15261432440 0032676 0 ustar 00root root 0000000 0000000 capitalized-true = True
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/bool/just-f.toml 0000664 0000000 0000000 00000000034 15261432440 0030643 0 ustar 00root root 0000000 0000000 just-f = f
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/bool/just-t.toml 0000664 0000000 0000000 00000000034 15261432440 0030661 0 ustar 00root root 0000000 0000000 just-t = t
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/bool/mixed-case-false.toml 0000664 0000000 0000000 00000000040 15261432440 0032537 0 ustar 00root root 0000000 0000000 mixed-case-false = falsE
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/bool/mixed-case-true.toml 0000664 0000000 0000000 00000000037 15261432440 0032432 0 ustar 00root root 0000000 0000000 mixed-case-true = trUe
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/bool/mixed-case.toml 0000664 0000000 0000000 00000000052 15261432440 0031452 0 ustar 00root root 0000000 0000000 mixed-case = valid = False
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/bool/starting-same-false.toml 0000664 0000000 0000000 00000000041 15261432440 0033277 0 ustar 00root root 0000000 0000000 starting-same-false = falsey
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/bool/starting-same-true.toml 0000664 0000000 0000000 00000000040 15261432440 0033163 0 ustar 00root root 0000000 0000000 starting-same-true = truer
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/bool/wrong-case-false.toml 0000664 0000000 0000000 00000000040 15261432440 0032565 0 ustar 00root root 0000000 0000000 wrong-case-false = FALSE
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/bool/wrong-case-true.toml 0000664 0000000 0000000 00000000037 15261432440 0032460 0 ustar 00root root 0000000 0000000 wrong-case-true = TRUE
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/control/ 0000775 0000000 0000000 00000000000 15261432440 0027266 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/control/bare-cr.toml 0000664 0000000 0000000 00000000113 15261432440 0031471 0 ustar 00root root 0000000 0000000 # The following line contains a single carriage return control character
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/control/bare-formfeed.toml 0000664 0000000 0000000 00000000026 15261432440 0032657 0 ustar 00root root 0000000 0000000 bare-formfeed =
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/control/bare-null.toml 0000664 0000000 0000000 00000000043 15261432440 0032041 0 ustar 00root root 0000000 0000000 bare-null = "some value"
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/control/bare-vertical-tab.toml 0000664 0000000 0000000 00000000026 15261432440 0033445 0 ustar 00root root 0000000 0000000 bare-vertical-tab =
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/control/comment-cr.toml 0000664 0000000 0000000 00000000063 15261432440 0032226 0 ustar 00root root 0000000 0000000 comment-cr = "Carriage return in comment" #
a=1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/control/comment-del.toml 0000664 0000000 0000000 00000000034 15261432440 0032364 0 ustar 00root root 0000000 0000000 comment-del = "0x7f" #
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/control/comment-ff.toml 0000664 0000000 0000000 00000000034 15261432440 0032213 0 ustar 00root root 0000000 0000000 comment-ff = "0x7f" #
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/control/comment-lf.toml 0000664 0000000 0000000 00000000034 15261432440 0032221 0 ustar 00root root 0000000 0000000 comment-lf = "ctrl-P" #
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/control/comment-null.toml 0000664 0000000 0000000 00000000034 15261432440 0032572 0 ustar 00root root 0000000 0000000 comment-null = "null" #
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/control/comment-us.toml 0000664 0000000 0000000 00000000034 15261432440 0032247 0 ustar 00root root 0000000 0000000 comment-us = "ctrl-_" #
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/control/multi-cr.toml 0000664 0000000 0000000 00000000031 15261432440 0031711 0 ustar 00root root 0000000 0000000 multi-cr = """null
"""
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/control/multi-del.toml 0000664 0000000 0000000 00000000031 15261432440 0032051 0 ustar 00root root 0000000 0000000 multi-del = """null"""
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/control/multi-lf.toml 0000664 0000000 0000000 00000000031 15261432440 0031706 0 ustar 00root root 0000000 0000000 multi-lf = """null"""
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/control/multi-null.toml 0000664 0000000 0000000 00000000031 15261432440 0032257 0 ustar 00root root 0000000 0000000 multi-null = """null """
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/control/multi-us.toml 0000664 0000000 0000000 00000000031 15261432440 0031734 0 ustar 00root root 0000000 0000000 multi-us = """null"""
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/control/only-ff.toml 0000664 0000000 0000000 00000000001 15261432440 0031524 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/control/only-null.toml 0000664 0000000 0000000 00000000001 15261432440 0032103 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/control/only-vt.toml 0000664 0000000 0000000 00000000001 15261432440 0031562 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/control/rawmulti-cr.toml 0000664 0000000 0000000 00000000034 15261432440 0032426 0 ustar 00root root 0000000 0000000 rawmulti-cr = '''null
'''
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/control/rawmulti-del.toml 0000664 0000000 0000000 00000000034 15261432440 0032566 0 ustar 00root root 0000000 0000000 rawmulti-del = '''null'''
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/control/rawmulti-lf.toml 0000664 0000000 0000000 00000000034 15261432440 0032423 0 ustar 00root root 0000000 0000000 rawmulti-lf = '''null'''
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/control/rawmulti-null.toml 0000664 0000000 0000000 00000000034 15261432440 0032774 0 ustar 00root root 0000000 0000000 rawmulti-null = '''null '''
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/control/rawmulti-us.toml 0000664 0000000 0000000 00000000034 15261432440 0032451 0 ustar 00root root 0000000 0000000 rawmulti-us = '''null'''
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/control/rawstring-cr.toml 0000664 0000000 0000000 00000000031 15261432440 0032577 0 ustar 00root root 0000000 0000000 rawstring-cr = 'null
'
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/control/rawstring-del.toml 0000664 0000000 0000000 00000000031 15261432440 0032737 0 ustar 00root root 0000000 0000000 rawstring-del = 'null'
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/control/rawstring-lf.toml 0000664 0000000 0000000 00000000031 15261432440 0032574 0 ustar 00root root 0000000 0000000 rawstring-lf = 'null'
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/control/rawstring-null.toml 0000664 0000000 0000000 00000000031 15261432440 0033145 0 ustar 00root root 0000000 0000000 rawstring-null = 'null '
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/control/rawstring-us.toml 0000664 0000000 0000000 00000000031 15261432440 0032622 0 ustar 00root root 0000000 0000000 rawstring-us = 'null'
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/control/string-bs.toml 0000664 0000000 0000000 00000000033 15261432440 0032067 0 ustar 00root root 0000000 0000000 string-bs = "backspace"
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/control/string-cr.toml 0000664 0000000 0000000 00000000026 15261432440 0032071 0 ustar 00root root 0000000 0000000 string-cr = "null
"
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/control/string-del.toml 0000664 0000000 0000000 00000000026 15261432440 0032231 0 ustar 00root root 0000000 0000000 string-del = "null"
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/control/string-lf.toml 0000664 0000000 0000000 00000000026 15261432440 0032066 0 ustar 00root root 0000000 0000000 string-lf = "null"
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/control/string-null.toml 0000664 0000000 0000000 00000000026 15261432440 0032437 0 ustar 00root root 0000000 0000000 string-null = "null "
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/control/string-us.toml 0000664 0000000 0000000 00000000026 15261432440 0032114 0 ustar 00root root 0000000 0000000 string-us = "null"
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/datetime/ 0000775 0000000 0000000 00000000000 15261432440 0027402 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/datetime/day-zero.toml 0000664 0000000 0000000 00000000036 15261432440 0032030 0 ustar 00root root 0000000 0000000 foo = 1997-09-00T09:09:09.09Z
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/datetime/feb-29.toml 0000664 0000000 0000000 00000000051 15261432440 0031257 0 ustar 00root root 0000000 0000000 "not a leap year" = 2100-02-29T15:15:15Z
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/datetime/feb-30.toml 0000664 0000000 0000000 00000000070 15261432440 0031250 0 ustar 00root root 0000000 0000000 "only 28 or 29 days in february" = 1988-02-30T15:15:15Z
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/datetime/hour-over.toml 0000664 0000000 0000000 00000000102 15261432440 0032216 0 ustar 00root root 0000000 0000000 # time-hour = 2DIGIT ; 00-23
d = 2006-01-01T24:00:00-00:00
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/datetime/mday-over.toml 0000664 0000000 0000000 00000000211 15261432440 0032174 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-b3b679b/tests/data/invalid/_external/toml-test/invalid/datetime/mday-under.toml 0000664 0000000 0000000 00000000211 15261432440 0032336 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-b3b679b/tests/data/invalid/_external/toml-test/invalid/datetime/minute-over.toml 0000664 0000000 0000000 00000000102 15261432440 0032542 0 ustar 00root root 0000000 0000000 # time-minute = 2DIGIT ; 00-59
d = 2006-01-01T00:60:00-00:00
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/datetime/month-over.toml 0000664 0000000 0000000 00000000102 15261432440 0032366 0 ustar 00root root 0000000 0000000 # date-month = 2DIGIT ; 01-12
d = 2006-13-01T00:00:00-00:00
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/datetime/month-under.toml 0000664 0000000 0000000 00000000102 15261432440 0032530 0 ustar 00root root 0000000 0000000 # date-month = 2DIGIT ; 01-12
d = 2007-00-01T00:00:00-00:00
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/datetime/no-date-time-sep.toml 0000664 0000000 0000000 00000000031 15261432440 0033341 0 ustar 00root root 0000000 0000000 foo = 1997-09-0909:09:09
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/datetime/no-leads-month.toml 0000664 0000000 0000000 00000000132 15261432440 0033120 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 15261432440 0033776 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/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-b3b679b/tests/data/invalid/_external/toml-test/invalid/datetime/no-leads.toml 0000664 0000000 0000000 00000000132 15261432440 0031775 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-b3b679b/tests/data/invalid/_external/toml-test/invalid/datetime/no-t.toml 0000664 0000000 0000000 00000000106 15261432440 0031151 0 ustar 00root root 0000000 0000000 # No "t" or "T" between the date and time.
no-t = 1987-07-0517:45:00Z
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/datetime/no-year-month-sep.toml 0000664 0000000 0000000 00000000020 15261432440 0033551 0 ustar 00root root 0000000 0000000 foo = 199709-09
offset-minus-minute-1digit.toml 0000664 0000000 0000000 00000000042 15261432440 0035311 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/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 15261432440 0036304 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/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 15261432440 0035522 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/datetime foo = 1997-09-09T09:09:09.09+
offset-minus-no-minute.toml 0000664 0000000 0000000 00000000040 15261432440 0034542 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/datetime foo = 1997-09-09T09:09:09.09+09
offset-overflow-hour.toml 0000664 0000000 0000000 00000000063 15261432440 0034321 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/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 15261432440 0034645 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/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 15261432440 0035141 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/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 15261432440 0036134 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/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 15261432440 0035352 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/datetime foo = 1997-09-09T09:09:09.09+
offset-plus-no-minute.toml 0000664 0000000 0000000 00000000040 15261432440 0034372 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/datetime foo = 1997-09-09T09:09:09.09+09
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/datetime/only-T.toml 0000664 0000000 0000000 00000000010 15261432440 0031450 0 ustar 00root root 0000000 0000000 foo = T
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/datetime/only-TZ.toml 0000664 0000000 0000000 00000000011 15261432440 0031603 0 ustar 00root root 0000000 0000000 foo = TZ
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/datetime/only-Tdot.toml 0000664 0000000 0000000 00000000011 15261432440 0032160 0 ustar 00root root 0000000 0000000 foo = T.
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/datetime/second-over.toml 0000664 0000000 0000000 00000000211 15261432440 0032515 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 15261432440 0034062 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/datetime foo = 1997-09-09T09:09:09.
second-trailing-dotz.toml 0000664 0000000 0000000 00000000034 15261432440 0034255 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/datetime foo = 2016-09-09T09:09:09.Z
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/datetime/time-no-leads.toml 0000664 0000000 0000000 00000000070 15261432440 0032732 0 ustar 00root root 0000000 0000000 # Leading 0 is always required.
d = 2023-10-01T1:32:00Z
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/datetime/trailing-x.toml 0000664 0000000 0000000 00000000021 15261432440 0032346 0 ustar 00root root 0000000 0000000 sign=2020-01-01x
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/datetime/y10k.toml 0000664 0000000 0000000 00000000072 15261432440 0031062 0 ustar 00root root 0000000 0000000 # Maximum RFC3399 year is 9999.
d = 10000-01-01 00:00:00z
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/encoding/ 0000775 0000000 0000000 00000000000 15261432440 0027374 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/encoding/bad-codepoint.toml 0000664 0000000 0000000 00000000041 15261432440 0032774 0 ustar 00root root 0000000 0000000 # Invalid codepoint U+D800 : í €
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/encoding/bad-utf8-at-end.toml 0000664 0000000 0000000 00000000362 15261432440 0033052 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-b3b679b/tests/data/invalid/_external/toml-test/invalid/encoding/bad-utf8-in-array.toml 0000664 0000000 0000000 00000000125 15261432440 0033421 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 15261432440 0033662 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/encoding # Ã
bad-utf8-in-multiline-literal.toml 0000664 0000000 0000000 00000000107 15261432440 0035660 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/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 15261432440 0034226 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/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 15261432440 0035160 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/encoding # The following line contains an invalid UTF-8 sequence.
bad = 'Ã'
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/encoding/bad-utf8-in-string.toml0000664 0000000 0000000 00000000103 15261432440 0033605 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 15261432440 0033534 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/encoding bom-not-at-start ÿý
bom-not-at-start-02.toml 0000664 0000000 0000000 00000000025 15261432440 0033536 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/encoding bom-not-at-start= ÿý
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/encoding/ideographic-space.toml 0000664 0000000 0000000 00000000100 15261432440 0033627 0 ustar 00root root 0000000 0000000 # First on next line is U+3000 IDEOGRAPHIC SPACE
foo = "bar"
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/encoding/utf16-bom.toml 0000664 0000000 0000000 00000000046 15261432440 0032011 0 ustar 00root root 0000000 0000000 þÿ # U T F - 1 6 w i t h B O M
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/encoding/utf16-comment.toml 0000664 0000000 0000000 00000000052 15261432440 0032673 0 ustar 00root root 0000000 0000000 # U T F - 1 6 w i t h o u t B O M
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/encoding/utf16-key.toml 0000664 0000000 0000000 00000000020 15261432440 0032014 0 ustar 00root root 0000000 0000000 k = " v "
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/ 0000775 0000000 0000000 00000000000 15261432440 0026713 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/double-dot-01.toml 0000664 0000000 0000000 00000000025 15261432440 0032061 0 ustar 00root root 0000000 0000000 double-dot-01 = 0..1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/double-dot-02.toml 0000664 0000000 0000000 00000000026 15261432440 0032063 0 ustar 00root root 0000000 0000000 double-dot-02 = 0.1.2
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/exp-dot-01.toml 0000664 0000000 0000000 00000000023 15261432440 0031401 0 ustar 00root root 0000000 0000000 exp-dot-01 = 1e2.3
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/exp-dot-02.toml 0000664 0000000 0000000 00000000022 15261432440 0031401 0 ustar 00root root 0000000 0000000 exp-dot-02 = 1.e2
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/exp-dot-03.toml 0000664 0000000 0000000 00000000024 15261432440 0031404 0 ustar 00root root 0000000 0000000 exp-dot-03 = 3.e+20
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/exp-double-e-01.toml 0000664 0000000 0000000 00000000027 15261432440 0032313 0 ustar 00root root 0000000 0000000 exp-double-e-01 = 1ee2
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/exp-double-e-02.toml 0000664 0000000 0000000 00000000030 15261432440 0032306 0 ustar 00root root 0000000 0000000 exp-double-e-02 = 1e2e3
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/exp-double-us.toml 0000664 0000000 0000000 00000000027 15261432440 0032300 0 ustar 00root root 0000000 0000000 exp-double-us = 1e__23
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/exp-leading-us.toml 0000664 0000000 0000000 00000000027 15261432440 0032431 0 ustar 00root root 0000000 0000000 exp-leading-us = 1e_23
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/exp-trailing-us-01.toml 0000664 0000000 0000000 00000000032 15261432440 0033051 0 ustar 00root root 0000000 0000000 exp-trailing-us-01 = 1_e2
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/exp-trailing-us-02.toml 0000664 0000000 0000000 00000000034 15261432440 0033054 0 ustar 00root root 0000000 0000000 exp-trailing-us-02 = 1.2_e2
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/exp-trailing-us.toml 0000664 0000000 0000000 00000000030 15261432440 0032631 0 ustar 00root root 0000000 0000000 exp-trailing-us = 1e23_
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/inf-capital.toml 0000664 0000000 0000000 00000000010 15261432440 0031766 0 ustar 00root root 0000000 0000000 v = Inf
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/inf-incomplete-01.toml 0000664 0000000 0000000 00000000027 15261432440 0032736 0 ustar 00root root 0000000 0000000 inf-incomplete-01 = in
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/inf-incomplete-02.toml 0000664 0000000 0000000 00000000030 15261432440 0032731 0 ustar 00root root 0000000 0000000 inf-incomplete-02 = +in
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/inf-incomplete-03.toml 0000664 0000000 0000000 00000000030 15261432440 0032732 0 ustar 00root root 0000000 0000000 inf-incomplete-03 = -in
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/inf_underscore.toml 0000664 0000000 0000000 00000000026 15261432440 0032613 0 ustar 00root root 0000000 0000000 inf_underscore = in_f
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/leading-dot-neg.toml 0000664 0000000 0000000 00000000032 15261432440 0032541 0 ustar 00root root 0000000 0000000 leading-dot-neg = -.12345
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/leading-dot-plus.toml 0000664 0000000 0000000 00000000033 15261432440 0032754 0 ustar 00root root 0000000 0000000 leading-dot-plus = +.12345
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/leading-dot.toml 0000664 0000000 0000000 00000000025 15261432440 0031774 0 ustar 00root root 0000000 0000000 leading-dot = .12345
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/leading-us.toml 0000664 0000000 0000000 00000000022 15261432440 0031632 0 ustar 00root root 0000000 0000000 leading-us = _1.2
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/leading-zero-neg.toml 0000664 0000000 0000000 00000000032 15261432440 0032732 0 ustar 00root root 0000000 0000000 leading-zero-neg = -03.14
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/leading-zero-plus.toml 0000664 0000000 0000000 00000000033 15261432440 0033145 0 ustar 00root root 0000000 0000000 leading-zero-plus = +03.14
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/leading-zero.toml 0000664 0000000 0000000 00000000025 15261432440 0032165 0 ustar 00root root 0000000 0000000 leading-zero = 03.14
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/nan-capital.toml 0000664 0000000 0000000 00000000010 15261432440 0031766 0 ustar 00root root 0000000 0000000 v = NaN
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/nan-incomplete-01.toml 0000664 0000000 0000000 00000000027 15261432440 0032736 0 ustar 00root root 0000000 0000000 nan-incomplete-01 = na
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/nan-incomplete-02.toml 0000664 0000000 0000000 00000000030 15261432440 0032731 0 ustar 00root root 0000000 0000000 nan-incomplete-02 = +na
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/nan-incomplete-03.toml 0000664 0000000 0000000 00000000030 15261432440 0032732 0 ustar 00root root 0000000 0000000 nan-incomplete-03 = -na
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/nan_underscore.toml 0000664 0000000 0000000 00000000026 15261432440 0032613 0 ustar 00root root 0000000 0000000 nan_underscore = na_n
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/trailing-dot-01.toml 0000664 0000000 0000000 00000000024 15261432440 0032417 0 ustar 00root root 0000000 0000000 trailing-point = 1.
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/trailing-dot-02.toml 0000664 0000000 0000000 00000000015 15261432440 0032420 0 ustar 00root root 0000000 0000000 a = 1.
b = 2
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/trailing-dot-min.toml 0000664 0000000 0000000 00000000027 15261432440 0032765 0 ustar 00root root 0000000 0000000 trailing-dot-min = -1.
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/trailing-dot-plus.toml 0000664 0000000 0000000 00000000030 15261432440 0033157 0 ustar 00root root 0000000 0000000 trailing-dot-plus = +1.
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/trailing-dot.toml 0000664 0000000 0000000 00000000022 15261432440 0032177 0 ustar 00root root 0000000 0000000 trailing-dot = 1.
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/trailing-exp-dot.toml 0000664 0000000 0000000 00000000030 15261432440 0032770 0 ustar 00root root 0000000 0000000 trailing-exp-dot = 0.e
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/trailing-exp-minus.toml 0000664 0000000 0000000 00000000033 15261432440 0033340 0 ustar 00root root 0000000 0000000 trailing-exp-minus = 0.0e-
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/trailing-exp-plus.toml 0000664 0000000 0000000 00000000032 15261432440 0033167 0 ustar 00root root 0000000 0000000 trailing-exp-plus = 0.0e+
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/trailing-exp.toml 0000664 0000000 0000000 00000000024 15261432440 0032207 0 ustar 00root root 0000000 0000000 trailing-exp = 0.0E
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/trailing-us-exp-01.toml 0000664 0000000 0000000 00000000031 15261432440 0033050 0 ustar 00root root 0000000 0000000 trailing-us-exp-1 = 1_e2
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/trailing-us-exp-02.toml 0000664 0000000 0000000 00000000033 15261432440 0033053 0 ustar 00root root 0000000 0000000 trailing-us-exp-2 = 1.2_e2
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/trailing-us.toml 0000664 0000000 0000000 00000000023 15261432440 0032041 0 ustar 00root root 0000000 0000000 trailing-us = 1.2_
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/us-after-dot.toml 0000664 0000000 0000000 00000000024 15261432440 0032116 0 ustar 00root root 0000000 0000000 us-after-dot = 1._2
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/float/us-before-dot.toml 0000664 0000000 0000000 00000000025 15261432440 0032260 0 ustar 00root root 0000000 0000000 us-before-dot = 1_.2
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/inline-table/ 0000775 0000000 0000000 00000000000 15261432440 0030151 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/inline-table/bad-key-syntax.toml0000664 0000000 0000000 00000000025 15261432440 0033703 0 ustar 00root root 0000000 0000000 tbl = { a = 1, [b] }
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/inline-table/double-comma.toml 0000664 0000000 0000000 00000000017 15261432440 0033410 0 ustar 00root root 0000000 0000000 t = {x=3,,y=4}
duplicate-key-01.toml 0000664 0000000 0000000 00000000101 15261432440 0033735 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/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 15261432440 0033747 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/inline-table table1 = { table2.dupe = 1, table2.dupe = 2 }
duplicate-key-03.toml 0000664 0000000 0000000 00000000124 15261432440 0033744 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/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 15261432440 0033751 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/inline-table tbl = { a.b = "a_b", a.b.c = "a_b_c" }
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/inline-table/empty-01.toml 0000664 0000000 0000000 00000000010 15261432440 0032411 0 ustar 00root root 0000000 0000000 t = {,}
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/inline-table/empty-02.toml 0000664 0000000 0000000 00000000011 15261432440 0032413 0 ustar 00root root 0000000 0000000 t = {,
}
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/inline-table/empty-03.toml 0000664 0000000 0000000 00000000012 15261432440 0032415 0 ustar 00root root 0000000 0000000 t = {
,
}
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/inline-table/no-close-01.toml 0000664 0000000 0000000 00000000004 15261432440 0032775 0 ustar 00root root 0000000 0000000 a={
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/inline-table/no-close-02.toml 0000664 0000000 0000000 00000000007 15261432440 0033001 0 ustar 00root root 0000000 0000000 a={b=1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/inline-table/no-comma-01.toml 0000664 0000000 0000000 00000000022 15261432440 0032764 0 ustar 00root root 0000000 0000000 t = {x = 3 y = 4}
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/inline-table/no-comma-02.toml 0000664 0000000 0000000 00000000063 15261432440 0032772 0 ustar 00root root 0000000 0000000 arrr = { comma-missing = true valid-toml = false }
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/inline-table/overwrite-01.toml 0000664 0000000 0000000 00000000132 15261432440 0033306 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-b3b679b/tests/data/invalid/_external/toml-test/invalid/inline-table/overwrite-02.toml 0000664 0000000 0000000 00000000077 15261432440 0033317 0 ustar 00root root 0000000 0000000 a={}
# Inline tables are immutable and can't be extended
[a.b]
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/inline-table/overwrite-03.toml 0000664 0000000 0000000 00000000026 15261432440 0033312 0 ustar 00root root 0000000 0000000 a = { b = 1 }
a.b = 2
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/inline-table/overwrite-04.toml 0000664 0000000 0000000 00000000054 15261432440 0033314 0 ustar 00root root 0000000 0000000 inline-t = { nest = {} }
[[inline-t.nest]]
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/inline-table/overwrite-05.toml 0000664 0000000 0000000 00000000052 15261432440 0033313 0 ustar 00root root 0000000 0000000 inline-t = { nest = {} }
[inline-t.nest]
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/inline-table/overwrite-06.toml 0000664 0000000 0000000 00000000027 15261432440 0033316 0 ustar 00root root 0000000 0000000 a = { b = 1, b.c = 2 }
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/inline-table/overwrite-07.toml 0000664 0000000 0000000 00000000065 15261432440 0033321 0 ustar 00root root 0000000 0000000 tab = { inner.table = [{}], inner.table.val = "bad" } hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/inline-table/overwrite-08.toml 0000664 0000000 0000000 00000000067 15261432440 0033324 0 ustar 00root root 0000000 0000000 tab = { inner = { dog = "best" }, inner.cat = "worst" } hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/inline-table/overwrite-09.toml 0000664 0000000 0000000 00000000106 15261432440 0033317 0 ustar 00root root 0000000 0000000 [tab.nested]
inline-t = { nest = {} }
[tab]
nested.inline-t.nest = 2
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/inline-table/overwrite-10.toml 0000664 0000000 0000000 00000000252 15261432440 0033311 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-b3b679b/tests/data/invalid/_external/toml-test/invalid/integer/ 0000775 0000000 0000000 00000000000 15261432440 0027243 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/integer/capital-bin.toml 0000664 0000000 0000000 00000000022 15261432440 0032315 0 ustar 00root root 0000000 0000000 capital-bin = 0B0
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/integer/capital-hex.toml 0000664 0000000 0000000 00000000022 15261432440 0032331 0 ustar 00root root 0000000 0000000 capital-hex = 0X1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/integer/capital-oct.toml 0000664 0000000 0000000 00000000022 15261432440 0032332 0 ustar 00root root 0000000 0000000 capital-oct = 0O0
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/integer/double-sign-nex.toml 0000664 0000000 0000000 00000000027 15261432440 0033137 0 ustar 00root root 0000000 0000000 double-sign-nex = --99
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/integer/double-sign-plus.toml 0000664 0000000 0000000 00000000030 15261432440 0033322 0 ustar 00root root 0000000 0000000 double-sign-plus = ++99
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/integer/double-us.toml 0000664 0000000 0000000 00000000022 15261432440 0032031 0 ustar 00root root 0000000 0000000 double-us = 1__23
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/integer/incomplete-bin.toml 0000664 0000000 0000000 00000000024 15261432440 0033041 0 ustar 00root root 0000000 0000000 incomplete-bin = 0b
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/integer/incomplete-hex.toml 0000664 0000000 0000000 00000000024 15261432440 0033055 0 ustar 00root root 0000000 0000000 incomplete-hex = 0x
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/integer/incomplete-oct.toml 0000664 0000000 0000000 00000000024 15261432440 0033056 0 ustar 00root root 0000000 0000000 incomplete-oct = 0o
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/integer/invalid-bin.toml 0000664 0000000 0000000 00000000025 15261432440 0032331 0 ustar 00root root 0000000 0000000 invalid-bin = 0b0012
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/integer/invalid-hex-01.toml 0000664 0000000 0000000 00000000030 15261432440 0032557 0 ustar 00root root 0000000 0000000 invalid-hex-01 = 0xaafz
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/integer/invalid-hex-02.toml 0000664 0000000 0000000 00000000035 15261432440 0032565 0 ustar 00root root 0000000 0000000 invalid-hex-02 = 0xgabba00f1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/integer/invalid-hex-03.toml 0000664 0000000 0000000 00000000011 15261432440 0032560 0 ustar 00root root 0000000 0000000 a = 0x-1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/integer/invalid-oct.toml 0000664 0000000 0000000 00000000024 15261432440 0032345 0 ustar 00root root 0000000 0000000 invalid-oct = 0o778
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/integer/leading-us-bin.toml 0000664 0000000 0000000 00000000026 15261432440 0032734 0 ustar 00root root 0000000 0000000 leading-us-bin = _0b1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/integer/leading-us-hex.toml 0000664 0000000 0000000 00000000026 15261432440 0032750 0 ustar 00root root 0000000 0000000 leading-us-hex = _0x1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/integer/leading-us-oct.toml 0000664 0000000 0000000 00000000026 15261432440 0032751 0 ustar 00root root 0000000 0000000 leading-us-oct = _0o1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/integer/leading-us.toml 0000664 0000000 0000000 00000000022 15261432440 0032162 0 ustar 00root root 0000000 0000000 leading-us = _123
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/integer/leading-zero-01.toml 0000664 0000000 0000000 00000000025 15261432440 0032733 0 ustar 00root root 0000000 0000000 leading-zero-01 = 01
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/integer/leading-zero-02.toml 0000664 0000000 0000000 00000000025 15261432440 0032734 0 ustar 00root root 0000000 0000000 leading-zero-02 = 00
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/integer/leading-zero-03.toml 0000664 0000000 0000000 00000000026 15261432440 0032736 0 ustar 00root root 0000000 0000000 leading-zero-03 = 0_0
leading-zero-sign-01.toml 0000664 0000000 0000000 00000000033 15261432440 0033611 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/integer leading-zero-sign-01 = -01
leading-zero-sign-02.toml 0000664 0000000 0000000 00000000033 15261432440 0033612 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/integer leading-zero-sign-02 = +01
leading-zero-sign-03.toml 0000664 0000000 0000000 00000000034 15261432440 0033614 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/integer leading-zero-sign-03 = +0_1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/integer/negative-bin.toml 0000664 0000000 0000000 00000000033 15261432440 0032504 0 ustar 00root root 0000000 0000000 negative-bin = -0b11010110
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/integer/negative-hex.toml 0000664 0000000 0000000 00000000025 15261432440 0032521 0 ustar 00root root 0000000 0000000 negative-hex = -0xff
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/integer/negative-oct.toml 0000664 0000000 0000000 00000000026 15261432440 0032523 0 ustar 00root root 0000000 0000000 negative-oct = -0o755
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/integer/positive-bin.toml 0000664 0000000 0000000 00000000033 15261432440 0032544 0 ustar 00root root 0000000 0000000 positive-bin = +0b11010110
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/integer/positive-hex.toml 0000664 0000000 0000000 00000000025 15261432440 0032561 0 ustar 00root root 0000000 0000000 positive-hex = +0xff
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/integer/positive-oct.toml 0000664 0000000 0000000 00000000026 15261432440 0032563 0 ustar 00root root 0000000 0000000 positive-oct = +0o755
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/integer/text-after-integer.toml 0000664 0000000 0000000 00000000041 15261432440 0033651 0 ustar 00root root 0000000 0000000 answer = 42 the ultimate answer?
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/integer/trailing-us-bin.toml 0000664 0000000 0000000 00000000027 15261432440 0033143 0 ustar 00root root 0000000 0000000 trailing-us-bin = 0b1_
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/integer/trailing-us-hex.toml 0000664 0000000 0000000 00000000027 15261432440 0033157 0 ustar 00root root 0000000 0000000 trailing-us-hex = 0x1_
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/integer/trailing-us-oct.toml 0000664 0000000 0000000 00000000027 15261432440 0033160 0 ustar 00root root 0000000 0000000 trailing-us-oct = 0o1_
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/integer/trailing-us.toml 0000664 0000000 0000000 00000000023 15261432440 0032371 0 ustar 00root root 0000000 0000000 trailing-us = 123_
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/integer/us-after-bin.toml 0000664 0000000 0000000 00000000024 15261432440 0032430 0 ustar 00root root 0000000 0000000 us-after-bin = 0b_1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/integer/us-after-hex.toml 0000664 0000000 0000000 00000000024 15261432440 0032444 0 ustar 00root root 0000000 0000000 us-after-hex = 0x_1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/integer/us-after-oct.toml 0000664 0000000 0000000 00000000024 15261432440 0032445 0 ustar 00root root 0000000 0000000 us-after-oct = 0o_1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/ 0000775 0000000 0000000 00000000000 15261432440 0026376 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/after-array.toml 0000664 0000000 0000000 00000000040 15261432440 0031502 0 ustar 00root root 0000000 0000000 [[agencies]] owner = "S Cjelli"
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/after-table.toml 0000664 0000000 0000000 00000000044 15261432440 0031457 0 ustar 00root root 0000000 0000000 [error] this = "should not be here"
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/after-value.toml 0000664 0000000 0000000 00000000060 15261432440 0031502 0 ustar 00root root 0000000 0000000 first = "Tom" last = "Preston-Werner" # INVALID
bare-invalid-character-01.toml 0000664 0000000 0000000 00000000010 15261432440 0033710 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key ! = 123
bare-invalid-character-02.toml 0000664 0000000 0000000 00000000017 15261432440 0033720 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key bare!key = 123
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/dot.toml 0000664 0000000 0000000 00000000006 15261432440 0030055 0 ustar 00root root 0000000 0000000 . = 1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/dotdot.toml 0000664 0000000 0000000 00000000007 15261432440 0030565 0 ustar 00root root 0000000 0000000 .. = 1
dotted-redefine-table-01.toml 0000664 0000000 0000000 00000000025 15261432440 0033556 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key a = false
a.b = true
dotted-redefine-table-02.toml 0000664 0000000 0000000 00000000114 15261432440 0033556 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/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-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/duplicate-keys-01.toml 0000664 0000000 0000000 00000000036 15261432440 0032433 0 ustar 00root root 0000000 0000000 name = "Tom"
name = "Pradyun"
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/duplicate-keys-02.toml 0000664 0000000 0000000 00000000031 15261432440 0032427 0 ustar 00root root 0000000 0000000 dupe = false
dupe = true
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/duplicate-keys-03.toml 0000664 0000000 0000000 00000000061 15261432440 0032433 0 ustar 00root root 0000000 0000000 spelling = "favorite"
"spelling" = "favourite"
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/duplicate-keys-04.toml 0000664 0000000 0000000 00000000061 15261432440 0032434 0 ustar 00root root 0000000 0000000 spelling = "favorite"
'spelling' = "favourite"
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/duplicate-keys-05.toml 0000664 0000000 0000000 00000000032 15261432440 0032433 0 ustar 00root root 0000000 0000000 a = 1
"\u0061" = 1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/duplicate-keys-06.toml 0000664 0000000 0000000 00000000036 15261432440 0032440 0 ustar 00root root 0000000 0000000 "a'b" = 1
"a\u0027b" = 2
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/duplicate-keys-07.toml 0000664 0000000 0000000 00000000016 15261432440 0032437 0 ustar 00root root 0000000 0000000 "" = 1
"" = 2
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/duplicate-keys-08.toml 0000664 0000000 0000000 00000000024 15261432440 0032437 0 ustar 00root root 0000000 0000000 arr = [1]
arr = [2]
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/duplicate-keys-09.toml 0000664 0000000 0000000 00000000031 15261432440 0032436 0 ustar 00root root 0000000 0000000 tbl = {k=1}
tbl = {kk=2}
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/empty.toml 0000664 0000000 0000000 00000000005 15261432440 0030424 0 ustar 00root root 0000000 0000000 = 1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/end-in-escape.toml 0000664 0000000 0000000 00000000035 15261432440 0031701 0 ustar 00root root 0000000 0000000 "backslash is the last char\
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/escape.toml 0000664 0000000 0000000 00000000055 15261432440 0030533 0 ustar 00root root 0000000 0000000 \u00c0 = "latin capital letter A with grave"
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/hash.toml 0000664 0000000 0000000 00000000007 15261432440 0030213 0 ustar 00root root 0000000 0000000 a# = 1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/multiline-key-01.toml 0000664 0000000 0000000 00000000016 15261432440 0032276 0 ustar 00root root 0000000 0000000 """key""" = 1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/multiline-key-02.toml 0000664 0000000 0000000 00000000016 15261432440 0032277 0 ustar 00root root 0000000 0000000 '''key''' = 1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/multiline-key-03.toml 0000664 0000000 0000000 00000000024 15261432440 0032277 0 ustar 00root root 0000000 0000000 """key""" = """v"""
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/multiline-key-04.toml 0000664 0000000 0000000 00000000024 15261432440 0032300 0 ustar 00root root 0000000 0000000 '''key''' = '''v'''
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/newline-01.toml 0000664 0000000 0000000 00000000017 15261432440 0031150 0 ustar 00root root 0000000 0000000 barekey
= 1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/newline-02.toml 0000664 0000000 0000000 00000000021 15261432440 0031144 0 ustar 00root root 0000000 0000000 "quoted
key" = 1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/newline-03.toml 0000664 0000000 0000000 00000000021 15261432440 0031145 0 ustar 00root root 0000000 0000000 'quoted
key' = 1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/newline-04.toml 0000664 0000000 0000000 00000000023 15261432440 0031150 0 ustar 00root root 0000000 0000000 """long
key""" = 1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/newline-05.toml 0000664 0000000 0000000 00000000023 15261432440 0031151 0 ustar 00root root 0000000 0000000 '''long
key''' = 1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/newline-06.toml 0000664 0000000 0000000 00000000010 15261432440 0031146 0 ustar 00root root 0000000 0000000 key =
1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/no-eol-01.toml 0000664 0000000 0000000 00000000014 15261432440 0030675 0 ustar 00root root 0000000 0000000 a = 1 b = 2
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/no-eol-02.toml 0000664 0000000 0000000 00000000013 15261432440 0030675 0 ustar 00root root 0000000 0000000 0=0r=false
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/no-eol-03.toml 0000664 0000000 0000000 00000000051 15261432440 0030700 0 ustar 00root root 0000000 0000000 0=""o=""m=""r=""00="0"q="""0"""e="""0"""
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/no-eol-04.toml 0000664 0000000 0000000 00000000066 15261432440 0030707 0 ustar 00root root 0000000 0000000 [[0000l0]]
0="0"[[0000l0]]
0="0"[[0000l0]]
0="0"l="0"
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/no-eol-05.toml 0000664 0000000 0000000 00000000114 15261432440 0030702 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-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/no-eol-06.toml 0000664 0000000 0000000 00000000017 15261432440 0030705 0 ustar 00root root 0000000 0000000 0=0r0=0r=false
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/no-eol-07.toml 0000664 0000000 0000000 00000000030 15261432440 0030701 0 ustar 00root root 0000000 0000000 0=0r0=0r=falsefal=false
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/only-float.toml 0000664 0000000 0000000 00000000004 15261432440 0031351 0 ustar 00root root 0000000 0000000 1.1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/only-int.toml 0000664 0000000 0000000 00000000002 15261432440 0031034 0 ustar 00root root 0000000 0000000 1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/only-str.toml 0000664 0000000 0000000 00000000003 15261432440 0031053 0 ustar 00root root 0000000 0000000 ""
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/open-bracket.toml 0000664 0000000 0000000 00000000011 15261432440 0031635 0 ustar 00root root 0000000 0000000 [abc = 1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/partial-quoted.toml 0000664 0000000 0000000 00000000024 15261432440 0032222 0 ustar 00root root 0000000 0000000 partial"quoted" = 5
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/quoted-unclosed-01.toml 0000664 0000000 0000000 00000000011 15261432440 0032614 0 ustar 00root root 0000000 0000000 "key = x
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/quoted-unclosed-02.toml 0000664 0000000 0000000 00000000005 15261432440 0032620 0 ustar 00root root 0000000 0000000 "key
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/single-open-bracket.toml 0000664 0000000 0000000 00000000002 15261432440 0033114 0 ustar 00root root 0000000 0000000 [
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/space.toml 0000664 0000000 0000000 00000000010 15261432440 0030355 0 ustar 00root root 0000000 0000000 a b = 1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/special-character.toml 0000664 0000000 0000000 00000000035 15261432440 0032643 0 ustar 00root root 0000000 0000000 μ = "greek small letter mu"
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/start-bracket.toml 0000664 0000000 0000000 00000000021 15261432440 0032032 0 ustar 00root root 0000000 0000000 [a]
[xyz = 5
[b]
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/start-dot.toml 0000664 0000000 0000000 00000000011 15261432440 0031204 0 ustar 00root root 0000000 0000000 .key = 1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/two-equals-01.toml 0000664 0000000 0000000 00000000011 15261432440 0031602 0 ustar 00root root 0000000 0000000 key= = 1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/two-equals-02.toml 0000664 0000000 0000000 00000000005 15261432440 0031606 0 ustar 00root root 0000000 0000000 a==1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/two-equals-03.toml 0000664 0000000 0000000 00000000006 15261432440 0031610 0 ustar 00root root 0000000 0000000 a=b=1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/without-value-01.toml 0000664 0000000 0000000 00000000004 15261432440 0032320 0 ustar 00root root 0000000 0000000 key
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/without-value-02.toml 0000664 0000000 0000000 00000000007 15261432440 0032324 0 ustar 00root root 0000000 0000000 key =
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/without-value-03.toml 0000664 0000000 0000000 00000000006 15261432440 0032324 0 ustar 00root root 0000000 0000000 "key"
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/without-value-04.toml 0000664 0000000 0000000 00000000011 15261432440 0032321 0 ustar 00root root 0000000 0000000 "key" =
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/without-value-05.toml 0000664 0000000 0000000 00000000006 15261432440 0032326 0 ustar 00root root 0000000 0000000 fs.fw
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/without-value-06.toml 0000664 0000000 0000000 00000000010 15261432440 0032322 0 ustar 00root root 0000000 0000000 fs.fw =
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/key/without-value-07.toml 0000664 0000000 0000000 00000000004 15261432440 0032326 0 ustar 00root root 0000000 0000000 fs.
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/local-date/ 0000775 0000000 0000000 00000000000 15261432440 0027613 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/local-date/day-1digit.toml 0000664 0000000 0000000 00000000020 15261432440 0032434 0 ustar 00root root 0000000 0000000 foo = 1997-09-9
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/local-date/feb-29.toml 0000664 0000000 0000000 00000000037 15261432440 0031474 0 ustar 00root root 0000000 0000000 "not a leap year" = 2100-02-29
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/local-date/feb-30.toml 0000664 0000000 0000000 00000000057 15261432440 0031466 0 ustar 00root root 0000000 0000000 "only 28 or 29 days in february" = 1988-02-30
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/local-date/mday-over.toml 0000664 0000000 0000000 00000000172 15261432440 0032413 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-b3b679b/tests/data/invalid/_external/toml-test/invalid/local-date/mday-under.toml 0000664 0000000 0000000 00000000172 15261432440 0032555 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-b3b679b/tests/data/invalid/_external/toml-test/invalid/local-date/month-over.toml 0000664 0000000 0000000 00000000063 15261432440 0032605 0 ustar 00root root 0000000 0000000 # date-month = 2DIGIT ; 01-12
d = 2006-13-01
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/local-date/month-under.toml 0000664 0000000 0000000 00000000063 15261432440 0032747 0 ustar 00root root 0000000 0000000 # date-month = 2DIGIT ; 01-12
d = 2007-00-01
no-leads-with-milli.toml 0000664 0000000 0000000 00000000120 15261432440 0034201 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/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-b3b679b/tests/data/invalid/_external/toml-test/invalid/local-date/no-leads.toml 0000664 0000000 0000000 00000000120 15261432440 0032203 0 ustar 00root root 0000000 0000000 # Month "7" instead of "07"; the leading zero is required.
no-leads = 1987-7-05
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/local-date/trailing-t.toml 0000664 0000000 0000000 00000000062 15261432440 0032560 0 ustar 00root root 0000000 0000000 # Date cannot end with trailing T
d = 2006-01-30T
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/local-date/y10k.toml 0000664 0000000 0000000 00000000060 15261432440 0031270 0 ustar 00root root 0000000 0000000 # Maximum RFC3399 year is 9999.
d = 10000-01-01
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/local-date/year-3digits.toml 0000664 0000000 0000000 00000000020 15261432440 0033004 0 ustar 00root root 0000000 0000000 foo = 199-09-09
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/local-datetime/ 0000775 0000000 0000000 00000000000 15261432440 0030472 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/local-datetime/feb-29.toml 0000664 0000000 0000000 00000000050 15261432440 0032346 0 ustar 00root root 0000000 0000000 "not a leap year" = 2100-02-29T15:15:15
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/local-datetime/feb-30.toml 0000664 0000000 0000000 00000000070 15261432440 0032340 0 ustar 00root root 0000000 0000000 "only 28 or 29 days in february" = 1988-02-30T15:15:15
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/local-datetime/hour-over.toml 0000664 0000000 0000000 00000000074 15261432440 0033316 0 ustar 00root root 0000000 0000000 # time-hour = 2DIGIT ; 00-23
d = 2006-01-01T24:00:00
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/local-datetime/mday-over.toml 0000664 0000000 0000000 00000000203 15261432440 0033265 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-b3b679b/tests/data/invalid/_external/toml-test/invalid/local-datetime/mday-under.toml 0000664 0000000 0000000 00000000203 15261432440 0033427 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-b3b679b/tests/data/invalid/_external/toml-test/invalid/local-datetime/minute-over.toml 0000664 0000000 0000000 00000000074 15261432440 0033642 0 ustar 00root root 0000000 0000000 # time-minute = 2DIGIT ; 00-59
d = 2006-01-01T00:60:00
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/local-datetime/month-over.toml 0000664 0000000 0000000 00000000074 15261432440 0033466 0 ustar 00root root 0000000 0000000 # date-month = 2DIGIT ; 01-12
d = 2006-13-01T00:00:00
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/local-datetime/month-under.toml 0000664 0000000 0000000 00000000074 15261432440 0033630 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 15261432440 0035065 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/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-b3b679b/tests/data/invalid/_external/toml-test/invalid/local-datetime/no-leads.toml 0000664 0000000 0000000 00000000131 15261432440 0033064 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-b3b679b/tests/data/invalid/_external/toml-test/invalid/local-datetime/no-t.toml 0000664 0000000 0000000 00000000105 15261432440 0032240 0 ustar 00root root 0000000 0000000 # No "t" or "T" between the date and time.
no-t = 1987-07-0517:45:00
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/local-datetime/second-over.toml 0000664 0000000 0000000 00000000203 15261432440 0033606 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 15261432440 0033743 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/local-datetime # Leading 0 is always required.
d = 2023-10-01T1:32:00Z
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/local-datetime/y10k.toml 0000664 0000000 0000000 00000000071 15261432440 0032151 0 ustar 00root root 0000000 0000000 # Maximum RFC3399 year is 9999.
d = 10000-01-01 00:00:00
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/local-time/ 0000775 0000000 0000000 00000000000 15261432440 0027634 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/local-time/hour-over.toml 0000664 0000000 0000000 00000000061 15261432440 0032454 0 ustar 00root root 0000000 0000000 # time-hour = 2DIGIT ; 00-23
d = 24:00:00
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/local-time/minute-over.toml 0000664 0000000 0000000 00000000061 15261432440 0033000 0 ustar 00root root 0000000 0000000 # time-minute = 2DIGIT ; 00-59
d = 00:60:00
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/local-time/second-over.toml 0000664 0000000 0000000 00000000170 15261432440 0032753 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-b3b679b/tests/data/invalid/_external/toml-test/invalid/local-time/time-no-leads-01.toml0000664 0000000 0000000 00000000054 15261432440 0033404 0 ustar 00root root 0000000 0000000 # Leading 0 is always required.
d = 1:32:00
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/local-time/time-no-leads-02.toml0000664 0000000 0000000 00000000054 15261432440 0033405 0 ustar 00root root 0000000 0000000 # Leading 0 is always required.
d = 01:32:0
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/local-time/trailing-dot.toml 0000664 0000000 0000000 00000000016 15261432440 0033123 0 ustar 00root root 0000000 0000000 t = 12:13:14.
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/local-time/trailing-dotdot.toml 0000664 0000000 0000000 00000000017 15261432440 0033633 0 ustar 00root root 0000000 0000000 t = 12:13:14..
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/spec-1.1.0/ 0000775 0000000 0000000 00000000000 15261432440 0027173 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/spec-1.1.0/common-16-0.toml 0000664 0000000 0000000 00000000551 15261432440 0031742 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-b3b679b/tests/data/invalid/_external/toml-test/invalid/spec-1.1.0/common-19-0.toml 0000664 0000000 0000000 00000000442 15261432440 0031744 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-b3b679b/tests/data/invalid/_external/toml-test/invalid/spec-1.1.0/common-2.toml 0000664 0000000 0000000 00000000020 15261432440 0031507 0 ustar 00root root 0000000 0000000 key = # INVALID
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/spec-1.1.0/common-46-0.toml 0000664 0000000 0000000 00000000257 15261432440 0031750 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-b3b679b/tests/data/invalid/_external/toml-test/invalid/spec-1.1.0/common-46-1.toml 0000664 0000000 0000000 00000000257 15261432440 0031751 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-b3b679b/tests/data/invalid/_external/toml-test/invalid/spec-1.1.0/common-49-0.toml 0000664 0000000 0000000 00000000102 15261432440 0031740 0 ustar 00root root 0000000 0000000 [product]
type = { name = "Nail" }
type.edible = false # INVALID
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/spec-1.1.0/common-5.toml 0000664 0000000 0000000 00000000254 15261432440 0031523 0 ustar 00root root 0000000 0000000 = "no key name" # INVALID
"""key""" = "not allowed" # INVALID
"" = "blank" # VALID but discouraged
'' = 'blank' # VALID but discouraged
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/spec-1.1.0/common-50-0.toml 0000664 0000000 0000000 00000000102 15261432440 0031730 0 ustar 00root root 0000000 0000000 [product]
type.name = "Nail"
type = { edible = false } # INVALID
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/ 0000775 0000000 0000000 00000000000 15261432440 0027114 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/bad-byte-escape.toml 0000664 0000000 0000000 00000000021 15261432440 0032727 0 ustar 00root root 0000000 0000000 naughty = "\xAg"
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/bad-concat.toml 0000664 0000000 0000000 00000000035 15261432440 0032002 0 ustar 00root root 0000000 0000000 no_concat = "first" "second"
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/bad-escape-01.toml 0000664 0000000 0000000 00000000076 15261432440 0032216 0 ustar 00root root 0000000 0000000 invalid-escape = "This string has a bad \a escape character."
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/bad-escape-02.toml 0000664 0000000 0000000 00000000077 15261432440 0032220 0 ustar 00root root 0000000 0000000 invalid-escape = "This string has a bad \ escape character."
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/bad-escape-03.toml 0000664 0000000 0000000 00000000020 15261432440 0032205 0 ustar 00root root 0000000 0000000 backslash = "\"
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/bad-escape-04.toml 0000664 0000000 0000000 00000000016 15261432440 0032213 0 ustar 00root root 0000000 0000000 a = "a \\\ b"
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/bad-escape-05.toml 0000664 0000000 0000000 00000000020 15261432440 0032207 0 ustar 00root root 0000000 0000000 a = "a \\\\\ b"
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/bad-hex-esc-01.toml 0000664 0000000 0000000 00000000030 15261432440 0032300 0 ustar 00root root 0000000 0000000 bad-hex-esc-01 = "\x0g"
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/bad-hex-esc-02.toml 0000664 0000000 0000000 00000000030 15261432440 0032301 0 ustar 00root root 0000000 0000000 bad-hex-esc-02 = "\xG0"
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/bad-hex-esc-03.toml 0000664 0000000 0000000 00000000026 15261432440 0032307 0 ustar 00root root 0000000 0000000 bad-hex-esc-03 = "\x"
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/bad-hex-esc-04.toml 0000664 0000000 0000000 00000000031 15261432440 0032304 0 ustar 00root root 0000000 0000000 bad-hex-esc-04 = "\x 50"
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/bad-hex-esc-05.toml 0000664 0000000 0000000 00000000030 15261432440 0032304 0 ustar 00root root 0000000 0000000 bad-hex-esc-5 = "\x 50"
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/bad-multiline.toml 0000664 0000000 0000000 00000000041 15261432440 0032532 0 ustar 00root root 0000000 0000000 multi = "first line
second line"
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/bad-slash-escape.toml 0000664 0000000 0000000 00000000076 15261432440 0033110 0 ustar 00root root 0000000 0000000 invalid-escape = "This string has a bad \/ escape character."
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/bad-uni-esc-01.toml 0000664 0000000 0000000 00000000032 15261432440 0032311 0 ustar 00root root 0000000 0000000 bad-uni-esc-01 = "val\ue"
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/bad-uni-esc-02.toml 0000664 0000000 0000000 00000000032 15261432440 0032312 0 ustar 00root root 0000000 0000000 bad-uni-esc-02 = "val\Ux"
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/bad-uni-esc-03.toml 0000664 0000000 0000000 00000000040 15261432440 0032312 0 ustar 00root root 0000000 0000000 bad-uni-esc-03 = "val\U0000000"
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/bad-uni-esc-04.toml 0000664 0000000 0000000 00000000035 15261432440 0032317 0 ustar 00root root 0000000 0000000 bad-uni-esc-04 = "val\U0000"
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/bad-uni-esc-05.toml 0000664 0000000 0000000 00000000041 15261432440 0032315 0 ustar 00root root 0000000 0000000 bad-uni-esc-05 = "val\Ugggggggg"
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/bad-uni-esc-06.toml 0000664 0000000 0000000 00000000116 15261432440 0032321 0 ustar 00root root 0000000 0000000 bad-uni-esc-06 = "This string contains a non scalar unicode codepoint \uD801"
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/bad-uni-esc-07.toml 0000664 0000000 0000000 00000000032 15261432440 0032317 0 ustar 00root root 0000000 0000000 bad-uni-esc-07 = "\uabag"
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/bad-uni-esc-ml-01.toml 0000664 0000000 0000000 00000000041 15261432440 0032717 0 ustar 00root root 0000000 0000000 bad-uni-esc-ml-01 = """val\ue"""
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/bad-uni-esc-ml-02.toml 0000664 0000000 0000000 00000000041 15261432440 0032720 0 ustar 00root root 0000000 0000000 bad-uni-esc-ml-02 = """val\Ux"""
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/bad-uni-esc-ml-03.toml 0000664 0000000 0000000 00000000047 15261432440 0032727 0 ustar 00root root 0000000 0000000 bad-uni-esc-ml-03 = """val\U0000000"""
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/bad-uni-esc-ml-04.toml 0000664 0000000 0000000 00000000044 15261432440 0032725 0 ustar 00root root 0000000 0000000 bad-uni-esc-ml-04 = """val\U0000"""
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/bad-uni-esc-ml-05.toml 0000664 0000000 0000000 00000000050 15261432440 0032723 0 ustar 00root root 0000000 0000000 bad-uni-esc-ml-05 = """val\Ugggggggg"""
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/bad-uni-esc-ml-06.toml 0000664 0000000 0000000 00000000125 15261432440 0032727 0 ustar 00root root 0000000 0000000 bad-uni-esc-ml-06 = """This string contains a non scalar unicode codepoint \uD801"""
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/bad-uni-esc-ml-07.toml 0000664 0000000 0000000 00000000041 15261432440 0032725 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 15261432440 0040411 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string a = """\UFFFFFFFF"""
basic-multiline-out-of-range-unicode-escape-02.toml 0000664 0000000 0000000 00000000025 15261432440 0040412 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string a = """\U00D80000"""
basic-multiline-quotes.toml 0000664 0000000 0000000 00000000062 15261432440 0034327 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string str5 = """Here are three quotation marks: """."""
basic-multiline-unknown-escape.toml 0000664 0000000 0000000 00000000015 15261432440 0035742 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string a = """\@"""
basic-out-of-range-unicode-escape-01.toml 0000664 0000000 0000000 00000000021 15261432440 0036405 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string a = "\UFFFFFFFF"
basic-out-of-range-unicode-escape-02.toml 0000664 0000000 0000000 00000000021 15261432440 0036406 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string a = "\U00D80000"
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/basic-unknown-escape.toml0000664 0000000 0000000 00000000011 15261432440 0034015 0 ustar 00root root 0000000 0000000 a = "\@"
literal-multiline-quotes-01.toml 0000664 0000000 0000000 00000000036 15261432440 0035121 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string a = '''6 apostrophes: ''''''
literal-multiline-quotes-02.toml 0000664 0000000 0000000 00000000052 15261432440 0035120 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string a = '''15 apostrophes: ''''''''''''''''''
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/missing-quotes-array.toml0000664 0000000 0000000 00000000017 15261432440 0034112 0 ustar 00root root 0000000 0000000 name = [value]
missing-quotes-inline-table.toml 0000664 0000000 0000000 00000000027 15261432440 0035261 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string name = { key = value }
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/missing-quotes.toml 0000664 0000000 0000000 00000000015 15261432440 0032774 0 ustar 00root root 0000000 0000000 name = value
multiline-bad-escape-01.toml 0000664 0000000 0000000 00000000017 15261432440 0034132 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string k = """t\a"""
multiline-bad-escape-02.toml 0000664 0000000 0000000 00000000061 15261432440 0034132 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/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 15261432440 0034133 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string # \ is not a valid escape.
k = """t\ """
multiline-bad-escape-04.toml 0000664 0000000 0000000 00000000024 15261432440 0034133 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string backslash = """\"""
multiline-escape-space-01.toml 0000664 0000000 0000000 00000000034 15261432440 0034476 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string a = """
foo \ \n
bar"""
multiline-escape-space-02.toml 0000664 0000000 0000000 00000000035 15261432440 0034500 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string bee = """
hee \
gee \ """
multiline-lit-no-close-01.toml 0000664 0000000 0000000 00000000041 15261432440 0034450 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string invalid = '''
this will fail
multiline-lit-no-close-02.toml 0000664 0000000 0000000 00000000006 15261432440 0034452 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string x='''
multiline-lit-no-close-03.toml 0000664 0000000 0000000 00000000050 15261432440 0034452 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string not-closed= '''
diibaa
blibae ete
eteta
multiline-lit-no-close-04.toml 0000664 0000000 0000000 00000000025 15261432440 0034455 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string bee = '''
hee
gee ''
multiline-no-close-01.toml 0000664 0000000 0000000 00000000041 15261432440 0033662 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string invalid = """
this will fail
multiline-no-close-02.toml 0000664 0000000 0000000 00000000006 15261432440 0033664 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string x="""
multiline-no-close-03.toml 0000664 0000000 0000000 00000000050 15261432440 0033664 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string not-closed= """
diibaa
blibae ete
eteta
multiline-no-close-04.toml 0000664 0000000 0000000 00000000025 15261432440 0033667 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string bee = """
hee
gee ""
multiline-no-close-05.toml 0000664 0000000 0000000 00000000025 15261432440 0033670 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string bee = """
hee
gee\
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/multiline-quotes-01.toml 0000664 0000000 0000000 00000000030 15261432440 0033540 0 ustar 00root root 0000000 0000000 a = """6 quotes: """"""
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/no-close-01.toml 0000664 0000000 0000000 00000000052 15261432440 0031743 0 ustar 00root root 0000000 0000000 no-ending-quote = "One time, at band camp
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/no-close-02.toml 0000664 0000000 0000000 00000000035 15261432440 0031745 0 ustar 00root root 0000000 0000000 "a-string".must-be = "closed
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/no-close-03.toml 0000664 0000000 0000000 00000000052 15261432440 0031745 0 ustar 00root root 0000000 0000000 no-ending-quote = 'One time, at band camp
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/no-close-04.toml 0000664 0000000 0000000 00000000035 15261432440 0031747 0 ustar 00root root 0000000 0000000 'a-string'.must-be = 'closed
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/no-close-05.toml 0000664 0000000 0000000 00000000075 15261432440 0031754 0 ustar 00root root 0000000 0000000 # No newline at end
no-ending-quote = "One time, at band camp hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/no-close-06.toml 0000664 0000000 0000000 00000000060 15261432440 0031747 0 ustar 00root root 0000000 0000000 # No newline at end
"a-string".must-be = "closed hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/no-close-07.toml 0000664 0000000 0000000 00000000075 15261432440 0031756 0 ustar 00root root 0000000 0000000 # No newline at end
no-ending-quote = 'One time, at band camp hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/no-close-08.toml 0000664 0000000 0000000 00000000060 15261432440 0031751 0 ustar 00root root 0000000 0000000 # No newline at end
'a-string'.must-be = 'closed hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/no-close-09.toml 0000664 0000000 0000000 00000000061 15261432440 0031753 0 ustar 00root root 0000000 0000000 # Newlines are not allowed in "-strings.
a = "
"
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/no-close-10.toml 0000664 0000000 0000000 00000000061 15261432440 0031743 0 ustar 00root root 0000000 0000000 # Newlines are not allowed in '-strings.
a = '
'
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/no-open-01.toml 0000664 0000000 0000000 00000000007 15261432440 0031577 0 ustar 00root root 0000000 0000000 s = a"
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/no-open-02.toml 0000664 0000000 0000000 00000000011 15261432440 0031573 0 ustar 00root root 0000000 0000000 a = [a"]
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/no-open-03.toml 0000664 0000000 0000000 00000000007 15261432440 0031601 0 ustar 00root root 0000000 0000000 s = a'
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/no-open-04.toml 0000664 0000000 0000000 00000000011 15261432440 0031575 0 ustar 00root root 0000000 0000000 a = [a']
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/no-open-05.toml 0000664 0000000 0000000 00000000011 15261432440 0031576 0 ustar 00root root 0000000 0000000 a = a"""
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/no-open-06.toml 0000664 0000000 0000000 00000000013 15261432440 0031601 0 ustar 00root root 0000000 0000000 a = [a"""]
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/no-open-07.toml 0000664 0000000 0000000 00000000011 15261432440 0031600 0 ustar 00root root 0000000 0000000 a = a'''
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/no-open-08.toml 0000664 0000000 0000000 00000000013 15261432440 0031603 0 ustar 00root root 0000000 0000000 a = [a''']
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/text-after-string.toml 0000664 0000000 0000000 00000000054 15261432440 0033377 0 ustar 00root root 0000000 0000000 string = "Is there life after strings?" No.
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/string/wrong-close.toml 0000664 0000000 0000000 00000000047 15261432440 0032251 0 ustar 00root root 0000000 0000000 bad-ending-quote = "double and single'
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/ 0000775 0000000 0000000 00000000000 15261432440 0026675 5 ustar 00root root 0000000 0000000 append-with-dotted-keys-01.toml 0000664 0000000 0000000 00000000753 15261432440 0034410 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/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 15261432440 0034404 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/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 15261432440 0034402 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table [[a.b]]
[a]
b.y = 2
append-with-dotted-keys-04.toml 0000664 0000000 0000000 00000000141 15261432440 0034402 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/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 15261432440 0034401 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/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 15261432440 0034405 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table a = 1
a.b = 2
append-with-dotted-keys-07.toml 0000664 0000000 0000000 00000000036 15261432440 0034410 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table a = {k1 = 1, k1.name = "joe"}
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/array-empty.toml 0000664 0000000 0000000 00000000032 15261432440 0032037 0 ustar 00root root 0000000 0000000 [[]]
name = "Born to Run"
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/array-implicit.toml 0000664 0000000 0000000 00000001156 15261432440 0032523 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-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/array-no-close-01.toml 0000664 0000000 0000000 00000000037 15261432440 0032643 0 ustar 00root root 0000000 0000000 [[albums]
name = "Born to Run"
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/array-no-close-02.toml 0000664 0000000 0000000 00000000042 15261432440 0032640 0 ustar 00root root 0000000 0000000 [[closing-bracket.missing]
blaa=2
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/array-no-close-03.toml 0000664 0000000 0000000 00000000012 15261432440 0032636 0 ustar 00root root 0000000 0000000 [[a
[[b]]
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/array-no-close-04.toml 0000664 0000000 0000000 00000000012 15261432440 0032637 0 ustar 00root root 0000000 0000000 [[a
b = 2
bare-invalid-character-01.toml 0000664 0000000 0000000 00000000014 15261432440 0034213 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table [!]
k = 123
bare-invalid-character-02.toml 0000664 0000000 0000000 00000000023 15261432440 0034214 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table [bare!key]
k = 123
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/dot.toml 0000664 0000000 0000000 00000000012 15261432440 0030351 0 ustar 00root root 0000000 0000000 [.]
k = 1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/dotdot.toml 0000664 0000000 0000000 00000000013 15261432440 0031061 0 ustar 00root root 0000000 0000000 [..]
k = 1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/duplicate-key-01.toml 0000664 0000000 0000000 00000000025 15261432440 0032545 0 ustar 00root root 0000000 0000000 [a]
b = 1
[a]
c = 2
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/duplicate-key-02.toml 0000664 0000000 0000000 00000000063 15261432440 0032550 0 ustar 00root root 0000000 0000000 [fruit]
type = "apple"
[fruit.type]
apple = "yes"
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/duplicate-key-03.toml 0000664 0000000 0000000 00000000055 15261432440 0032552 0 ustar 00root root 0000000 0000000 [fruit]
apple.color = "red"
[[fruit.apple]]
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/duplicate-key-04.toml 0000664 0000000 0000000 00000000065 15261432440 0032554 0 ustar 00root root 0000000 0000000 [fruit]
apple.color = "red"
[fruit.apple] # INVALID
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/duplicate-key-05.toml 0000664 0000000 0000000 00000000100 15261432440 0032543 0 ustar 00root root 0000000 0000000 [fruit]
apple.taste.sweet = true
[fruit.apple.taste] # INVALID
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/duplicate-key-06.toml 0000664 0000000 0000000 00000000016 15261432440 0032552 0 ustar 00root root 0000000 0000000 [tbl]
[[tbl]]
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/duplicate-key-07.toml 0000664 0000000 0000000 00000000016 15261432440 0032553 0 ustar 00root root 0000000 0000000 [[tbl]]
[tbl]
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/duplicate-key-08.toml 0000664 0000000 0000000 00000000046 15261432440 0032557 0 ustar 00root root 0000000 0000000 [a]
b = { c = 2, d = {} }
[a.b]
c = 2
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/duplicate-key-09.toml 0000664 0000000 0000000 00000000042 15261432440 0032554 0 ustar 00root root 0000000 0000000 [a]
foo="bar"
[a.b]
foo="bar"
[a]
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/duplicate-key-10.toml 0000664 0000000 0000000 00000000017 15261432440 0032546 0 ustar 00root root 0000000 0000000 a = []
[[a.b]]
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/empty-implicit-table.toml 0000664 0000000 0000000 00000000023 15261432440 0033620 0 ustar 00root root 0000000 0000000 [naughty..naughty]
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/empty.toml 0000664 0000000 0000000 00000000003 15261432440 0030721 0 ustar 00root root 0000000 0000000 []
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/equals-sign.toml 0000664 0000000 0000000 00000000013 15261432440 0032014 0 ustar 00root root 0000000 0000000 [name=bad]
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/llbrace.toml 0000664 0000000 0000000 00000000013 15261432440 0031170 0 ustar 00root root 0000000 0000000 [ [table]]
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/multiline-key-01.toml 0000664 0000000 0000000 00000000022 15261432440 0032572 0 ustar 00root root 0000000 0000000 ["""tbl"""]
k = 1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/multiline-key-02.toml 0000664 0000000 0000000 00000000022 15261432440 0032573 0 ustar 00root root 0000000 0000000 ['''tbl''']
k = 1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/nested-brackets-close.toml0000664 0000000 0000000 00000000017 15261432440 0033751 0 ustar 00root root 0000000 0000000 [a]b]
zyx = 42
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/nested-brackets-open.toml 0000664 0000000 0000000 00000000017 15261432440 0033605 0 ustar 00root root 0000000 0000000 [a[b]
zyx = 42
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/newline-01.toml 0000664 0000000 0000000 00000000015 15261432440 0031445 0 ustar 00root root 0000000 0000000 [tbl
]
k = 1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/newline-02.toml 0000664 0000000 0000000 00000000017 15261432440 0031450 0 ustar 00root root 0000000 0000000 ["tbl
"]
k = 1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/newline-03.toml 0000664 0000000 0000000 00000000017 15261432440 0031451 0 ustar 00root root 0000000 0000000 ["tbl"
]
k = 1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/newline-04.toml 0000664 0000000 0000000 00000000016 15261432440 0031451 0 ustar 00root root 0000000 0000000 [tbl.
]
k = 1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/newline-05.toml 0000664 0000000 0000000 00000000021 15261432440 0031446 0 ustar 00root root 0000000 0000000 [tbl
.sub]
k = 1
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/no-close-01.toml 0000664 0000000 0000000 00000000041 15261432440 0031522 0 ustar 00root root 0000000 0000000 [where will it end
name = value
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/no-close-02.toml 0000664 0000000 0000000 00000000042 15261432440 0031524 0 ustar 00root root 0000000 0000000 [closing-bracket.missingö
blaa=2
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/no-close-03.toml 0000664 0000000 0000000 00000000043 15261432440 0031526 0 ustar 00root root 0000000 0000000 ["where will it end]
name = value
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/no-close-04.toml 0000664 0000000 0000000 00000000002 15261432440 0031522 0 ustar 00root root 0000000 0000000 [
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/no-close-05.toml 0000664 0000000 0000000 00000000013 15261432440 0031525 0 ustar 00root root 0000000 0000000 [fwfw.wafw
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/no-close-06.toml 0000664 0000000 0000000 00000000016 15261432440 0031531 0 ustar 00root root 0000000 0000000 [a
[b]
[c
[d]
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/no-close-07.toml 0000664 0000000 0000000 00000000004 15261432440 0031527 0 ustar 00root root 0000000 0000000 [']
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/no-close-08.toml 0000664 0000000 0000000 00000000006 15261432440 0031532 0 ustar 00root root 0000000 0000000 [''']
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/no-close-09.toml 0000664 0000000 0000000 00000000044 15261432440 0031535 0 ustar 00root root 0000000 0000000 ["where will it end""]
name = value
overwrite-array-in-parent.toml 0000664 0000000 0000000 00000000070 15261432440 0034545 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/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 15261432440 0034553 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table a=true
[[a]]
overwrite-with-deep-table.toml 0000664 0000000 0000000 00000000016 15261432440 0034507 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table a=1
[a.b.c.d]
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/redefine-01.toml 0000664 0000000 0000000 00000000116 15261432440 0031567 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-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/redefine-02.toml 0000664 0000000 0000000 00000000031 15261432440 0031564 0 ustar 00root root 0000000 0000000 [t1]
t2.t3.v = 0
[t1.t2]
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/redefine-03.toml 0000664 0000000 0000000 00000000034 15261432440 0031570 0 ustar 00root root 0000000 0000000 [t1]
t2.t3.v = 0
[t1.t2.t3]
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/rrbrace.toml 0000664 0000000 0000000 00000000013 15261432440 0031204 0 ustar 00root root 0000000 0000000 [[table] ]
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/super-twice.toml 0000664 0000000 0000000 00000000016 15261432440 0032036 0 ustar 00root root 0000000 0000000 [a.b]
[a]
[a]
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/text-after-table.toml 0000664 0000000 0000000 00000000037 15261432440 0032742 0 ustar 00root root 0000000 0000000 [error] this shouldn't be here
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/trailing-dot.toml 0000664 0000000 0000000 00000000005 15261432440 0032162 0 ustar 00root root 0000000 0000000 [a.]
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/whitespace.toml 0000664 0000000 0000000 00000000016 15261432440 0031723 0 ustar 00root root 0000000 0000000 [invalid key]
hukkin-tomli-b3b679b/tests/data/invalid/_external/toml-test/invalid/table/with-pound.toml 0000664 0000000 0000000 00000000030 15261432440 0031661 0 ustar 00root root 0000000 0000000 [key#group]
answer = 42
hukkin-tomli-b3b679b/tests/data/invalid/array-missing-comma.toml 0000664 0000000 0000000 00000000024 15261432440 0025017 0 ustar 00root root 0000000 0000000 arrr = [true false]
hukkin-tomli-b3b679b/tests/data/invalid/array-of-tables/ 0000775 0000000 0000000 00000000000 15261432440 0023237 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/array-of-tables/overwrite-array-in-parent.toml 0000664 0000000 0000000 00000000070 15261432440 0031166 0 ustar 00root root 0000000 0000000 [[parent-table.arr]]
[parent-table]
not-arr = 1
arr = 2
hukkin-tomli-b3b679b/tests/data/invalid/array-of-tables/overwrite-bool-with-aot.toml 0000664 0000000 0000000 00000000014 15261432440 0030640 0 ustar 00root root 0000000 0000000 a=true
[[a]] hukkin-tomli-b3b679b/tests/data/invalid/array/ 0000775 0000000 0000000 00000000000 15261432440 0021365 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/array/file-end-after-val.toml 0000664 0000000 0000000 00000000004 15261432440 0025616 0 ustar 00root root 0000000 0000000 a=[1 hukkin-tomli-b3b679b/tests/data/invalid/array/unclosed-after-item.toml 0000664 0000000 0000000 00000000005 15261432440 0026124 0 ustar 00root root 0000000 0000000 v=[1, hukkin-tomli-b3b679b/tests/data/invalid/array/unclosed-empty.toml 0000664 0000000 0000000 00000000003 15261432440 0025223 0 ustar 00root root 0000000 0000000 v=[ hukkin-tomli-b3b679b/tests/data/invalid/basic-str-ends-in-escape.toml 0000664 0000000 0000000 00000000034 15261432440 0025621 0 ustar 00root root 0000000 0000000 "backslash is the last char\ hukkin-tomli-b3b679b/tests/data/invalid/boolean/ 0000775 0000000 0000000 00000000000 15261432440 0021666 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/boolean/invalid-false-casing.toml 0000664 0000000 0000000 00000000011 15261432440 0026533 0 ustar 00root root 0000000 0000000 val=falsE hukkin-tomli-b3b679b/tests/data/invalid/boolean/invalid-true-casing.toml 0000664 0000000 0000000 00000000010 15261432440 0026417 0 ustar 00root root 0000000 0000000 val=trUe hukkin-tomli-b3b679b/tests/data/invalid/dates-and-times/ 0000775 0000000 0000000 00000000000 15261432440 0023226 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/dates-and-times/invalid-day.toml 0000664 0000000 0000000 00000000056 15261432440 0026325 0 ustar 00root root 0000000 0000000 "only 28 or 29 days in february" = 1988-02-30
hukkin-tomli-b3b679b/tests/data/invalid/dotted-keys/ 0000775 0000000 0000000 00000000000 15261432440 0022503 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/dotted-keys/access-non-table.toml 0000664 0000000 0000000 00000000024 15261432440 0026512 0 ustar 00root root 0000000 0000000 a = false
a.b = true hukkin-tomli-b3b679b/tests/data/invalid/dotted-keys/extend-defined-aot.toml 0000664 0000000 0000000 00000000035 15261432440 0027042 0 ustar 00root root 0000000 0000000 [[tab.arr]]
[tab]
arr.val1=1
hukkin-tomli-b3b679b/tests/data/invalid/dotted-keys/extend-defined-table-with-subtable.toml 0000664 0000000 0000000 00000000046 15261432440 0032120 0 ustar 00root root 0000000 0000000 [a.b.c.d]
z = 9
[a]
b.c.d.k.t = 8
hukkin-tomli-b3b679b/tests/data/invalid/dotted-keys/extend-defined-table.toml 0000664 0000000 0000000 00000000040 15261432440 0027342 0 ustar 00root root 0000000 0000000 [a.b.c]
z = 9
[a]
b.c.t = 9
hukkin-tomli-b3b679b/tests/data/invalid/inline-table-missing-comma.toml 0000664 0000000 0000000 00000000063 15261432440 0026247 0 ustar 00root root 0000000 0000000 arrr = { comma-missing = true valid-toml = false }
hukkin-tomli-b3b679b/tests/data/invalid/inline-table/ 0000775 0000000 0000000 00000000000 15261432440 0022612 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/inline-table/define-twice-in-subtable.toml 0000664 0000000 0000000 00000000055 15261432440 0030255 0 ustar 00root root 0000000 0000000 table1 = { table2.dupe = 1, table2.dupe = 2 } hukkin-tomli-b3b679b/tests/data/invalid/inline-table/define-twice.toml 0000664 0000000 0000000 00000000036 15261432440 0026051 0 ustar 00root root 0000000 0000000 table = { dupe = 1, dupe = 2 } hukkin-tomli-b3b679b/tests/data/invalid/inline-table/file-end-after-key-val.toml 0000664 0000000 0000000 00000000006 15261432440 0027633 0 ustar 00root root 0000000 0000000 a={b=1 hukkin-tomli-b3b679b/tests/data/invalid/inline-table/mutate.toml 0000664 0000000 0000000 00000000025 15261432440 0025003 0 ustar 00root root 0000000 0000000 a = { b = 1 }
a.b = 2 hukkin-tomli-b3b679b/tests/data/invalid/inline-table/override-val-in-table.toml 0000664 0000000 0000000 00000000106 15261432440 0027574 0 ustar 00root root 0000000 0000000 [tab.nested]
inline-t = { nest = {} }
[tab]
nested.inline-t.nest = 2
hukkin-tomli-b3b679b/tests/data/invalid/inline-table/override-val-with-array.toml 0000664 0000000 0000000 00000000054 15261432440 0030172 0 ustar 00root root 0000000 0000000 inline-t = { nest = {} }
[[inline-t.nest]]
hukkin-tomli-b3b679b/tests/data/invalid/inline-table/override-val-with-table.toml 0000664 0000000 0000000 00000000052 15261432440 0030141 0 ustar 00root root 0000000 0000000 inline-t = { nest = {} }
[inline-t.nest]
hukkin-tomli-b3b679b/tests/data/invalid/inline-table/overwrite-implicitly.toml 0000664 0000000 0000000 00000000027 15261432440 0027711 0 ustar 00root root 0000000 0000000 a = { b = 1, b.c = 2 }
hukkin-tomli-b3b679b/tests/data/invalid/inline-table/overwrite-value-in-inner-array.toml 0000664 0000000 0000000 00000000065 15261432440 0031501 0 ustar 00root root 0000000 0000000 tab = { inner.table = [{}], inner.table.val = "bad" } hukkin-tomli-b3b679b/tests/data/invalid/inline-table/overwrite-value-in-inner-table.toml 0000664 0000000 0000000 00000000067 15261432440 0031454 0 ustar 00root root 0000000 0000000 tab = { inner = { dog = "best" }, inner.cat = "worst" } hukkin-tomli-b3b679b/tests/data/invalid/inline-table/unclosed-empty.toml 0000664 0000000 0000000 00000000003 15261432440 0026450 0 ustar 00root root 0000000 0000000 a={ hukkin-tomli-b3b679b/tests/data/invalid/invalid-comment-char.toml 0000664 0000000 0000000 00000000047 15261432440 0025146 0 ustar 00root root 0000000 0000000 # form feed () not allowed in comments hukkin-tomli-b3b679b/tests/data/invalid/invalid-escaped-unicode.toml 0000664 0000000 0000000 00000000033 15261432440 0025614 0 ustar 00root root 0000000 0000000 escaped-unicode = "\uabag"
hukkin-tomli-b3b679b/tests/data/invalid/invalid-hex.toml 0000664 0000000 0000000 00000000022 15261432440 0023346 0 ustar 00root root 0000000 0000000 hex = 0xgabba00f1
hukkin-tomli-b3b679b/tests/data/invalid/keys-and-vals/ 0000775 0000000 0000000 00000000000 15261432440 0022725 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/keys-and-vals/ends-early-table-def.toml 0000664 0000000 0000000 00000000012 15261432440 0027477 0 ustar 00root root 0000000 0000000 [fwfw.wafw hukkin-tomli-b3b679b/tests/data/invalid/keys-and-vals/ends-early.toml 0000664 0000000 0000000 00000000005 15261432440 0025660 0 ustar 00root root 0000000 0000000 fs.fw hukkin-tomli-b3b679b/tests/data/invalid/keys-and-vals/no-value.toml 0000664 0000000 0000000 00000000015 15261432440 0025344 0 ustar 00root root 0000000 0000000 why-no-value= hukkin-tomli-b3b679b/tests/data/invalid/keys-and-vals/only-ws-after-dot.toml 0000664 0000000 0000000 00000000003 15261432440 0027106 0 ustar 00root root 0000000 0000000 fs. hukkin-tomli-b3b679b/tests/data/invalid/keys-and-vals/overwrite-with-deep-table.toml 0000664 0000000 0000000 00000000016 15261432440 0030616 0 ustar 00root root 0000000 0000000 a=1
[a.b.c.d]
hukkin-tomli-b3b679b/tests/data/invalid/literal-str/ 0000775 0000000 0000000 00000000000 15261432440 0022511 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/literal-str/unclosed.toml 0000664 0000000 0000000 00000000016 15261432440 0025217 0 ustar 00root root 0000000 0000000 unclosed='dwdd hukkin-tomli-b3b679b/tests/data/invalid/missing-closing-double-square-bracket.toml 0000664 0000000 0000000 00000000042 15261432440 0030424 0 ustar 00root root 0000000 0000000 [[closing-bracket.missing]
blaa=2
hukkin-tomli-b3b679b/tests/data/invalid/missing-closing-square-bracket.toml 0000664 0000000 0000000 00000000042 15261432440 0027154 0 ustar 00root root 0000000 0000000 [closing-bracket.missingö
blaa=2
hukkin-tomli-b3b679b/tests/data/invalid/multiline-basic-str/ 0000775 0000000 0000000 00000000000 15261432440 0024136 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/multiline-basic-str/carriage-return.toml 0000664 0000000 0000000 00000000105 15261432440 0030121 0 ustar 00root root 0000000 0000000 s="""cr is not an allowed line ending
but we just tried to use it
""" hukkin-tomli-b3b679b/tests/data/invalid/multiline-basic-str/escape-only.toml 0000664 0000000 0000000 00000000016 15261432440 0027247 0 ustar 00root root 0000000 0000000 bee = """\"""
hukkin-tomli-b3b679b/tests/data/invalid/multiline-basic-str/file-ends-after-opening.toml 0000664 0000000 0000000 00000000005 15261432440 0031430 0 ustar 00root root 0000000 0000000 a=""" hukkin-tomli-b3b679b/tests/data/invalid/multiline-basic-str/last-line-escape.toml 0000664 0000000 0000000 00000000035 15261432440 0030157 0 ustar 00root root 0000000 0000000 bee = """
hee \
gee \ """
hukkin-tomli-b3b679b/tests/data/invalid/multiline-basic-str/unclosed-ends-in-whitespace-escape.toml 0000664 0000000 0000000 00000000024 15261432440 0033566 0 ustar 00root root 0000000 0000000 bee = """
hee
gee\ hukkin-tomli-b3b679b/tests/data/invalid/multiline-literal-str/ 0000775 0000000 0000000 00000000000 15261432440 0024511 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/multiline-literal-str/file-ends-after-opening.toml 0000664 0000000 0000000 00000000005 15261432440 0032003 0 ustar 00root root 0000000 0000000 a=''' hukkin-tomli-b3b679b/tests/data/invalid/multiline-literal-str/unclosed.toml 0000664 0000000 0000000 00000000024 15261432440 0027216 0 ustar 00root root 0000000 0000000 bee = '''
hee
gee '' hukkin-tomli-b3b679b/tests/data/invalid/non-scalar-escaped.toml 0000664 0000000 0000000 00000000012 15261432440 0024574 0 ustar 00root root 0000000 0000000 a="\ud800" hukkin-tomli-b3b679b/tests/data/invalid/table/ 0000775 0000000 0000000 00000000000 15261432440 0021336 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/invalid/table/eof-after-opening.toml 0000664 0000000 0000000 00000000001 15261432440 0025527 0 ustar 00root root 0000000 0000000 [ hukkin-tomli-b3b679b/tests/data/invalid/table/redefine-1.toml 0000664 0000000 0000000 00000000031 15261432440 0024144 0 ustar 00root root 0000000 0000000 [t1]
t2.t3.v = 0
[t1.t2]
hukkin-tomli-b3b679b/tests/data/invalid/table/redefine-2.toml 0000664 0000000 0000000 00000000034 15261432440 0024150 0 ustar 00root root 0000000 0000000 [t1]
t2.t3.v = 0
[t1.t2.t3]
hukkin-tomli-b3b679b/tests/data/invalid/unclosed-multiline-string.toml 0000664 0000000 0000000 00000000050 15261432440 0026257 0 ustar 00root root 0000000 0000000 not-closed= """
diibaa
blibae ete
eteta
hukkin-tomli-b3b679b/tests/data/invalid/unclosed-string.toml 0000664 0000000 0000000 00000000034 15261432440 0024261 0 ustar 00root root 0000000 0000000 "a-string".must-be = "closed hukkin-tomli-b3b679b/tests/data/valid/ 0000775 0000000 0000000 00000000000 15261432440 0017720 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/valid/_external/ 0000775 0000000 0000000 00000000000 15261432440 0021701 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/ 0000775 0000000 0000000 00000000000 15261432440 0023631 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/LICENSE 0000664 0000000 0000000 00000002067 15261432440 0024643 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-b3b679b/tests/data/valid/_external/toml-test/valid/ 0000775 0000000 0000000 00000000000 15261432440 0024730 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/array/ 0000775 0000000 0000000 00000000000 15261432440 0026046 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/array/array-subtables.json 0000664 0000000 0000000 00000000376 15261432440 0032047 0 ustar 00root root 0000000 0000000 {
"arr": [
{
"subtab": {
"val": {"type": "integer", "value": "1"}
}
},
{
"subtab": {
"val": {"type": "integer", "value": "2"}
}
}
]
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/array/array-subtables.toml 0000664 0000000 0000000 00000000067 15261432440 0032046 0 ustar 00root root 0000000 0000000 [[arr]]
[arr.subtab]
val=1
[[arr]]
[arr.subtab]
val=2
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/array/array.json 0000664 0000000 0000000 00000001466 15261432440 0030066 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-b3b679b/tests/data/valid/_external/toml-test/valid/array/array.toml 0000664 0000000 0000000 00000000312 15261432440 0030055 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-b3b679b/tests/data/valid/_external/toml-test/valid/array/bool.json 0000664 0000000 0000000 00000000153 15261432440 0027673 0 ustar 00root root 0000000 0000000 {
"a": [
{"type": "bool", "value": "true"},
{"type": "bool", "value": "false"}
]
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/array/bool.toml 0000664 0000000 0000000 00000000022 15261432440 0027670 0 ustar 00root root 0000000 0000000 a = [true, false]
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/array/empty.json 0000664 0000000 0000000 00000000036 15261432440 0030076 0 ustar 00root root 0000000 0000000 {
"thevoid": [[[[[]]]]]
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/array/empty.toml 0000664 0000000 0000000 00000000025 15261432440 0030076 0 ustar 00root root 0000000 0000000 thevoid = [[[[[]]]]]
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/array/hetergeneous.json 0000664 0000000 0000000 00000000554 15261432440 0031442 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-b3b679b/tests/data/valid/_external/toml-test/valid/array/hetergeneous.toml 0000664 0000000 0000000 00000000051 15261432440 0031434 0 ustar 00root root 0000000 0000000 mixed = [[1, 2], ["a", "b"], [1.1, 2.1]]
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/array/mixed-int-array.json 0000664 0000000 0000000 00000000220 15261432440 0031745 0 ustar 00root root 0000000 0000000 {
"arrays-and-ints": [
{"type": "integer", "value": "1"},
[{"type": "string", "value": "Arrays are not integers."}]
]
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/array/mixed-int-array.toml 0000664 0000000 0000000 00000000065 15261432440 0031756 0 ustar 00root root 0000000 0000000 arrays-and-ints = [1, ["Arrays are not integers."]]
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/array/mixed-int-float.json 0000664 0000000 0000000 00000000170 15261432440 0031740 0 ustar 00root root 0000000 0000000 {
"ints-and-floats": [
{"type": "integer", "value": "1"},
{"type": "float", "value": "1.1"}
]
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/array/mixed-int-float.toml 0000664 0000000 0000000 00000000033 15261432440 0031740 0 ustar 00root root 0000000 0000000 ints-and-floats = [1, 1.1]
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/array/mixed-int-string.json 0000664 0000000 0000000 00000000172 15261432440 0032143 0 ustar 00root root 0000000 0000000 {
"strings-and-ints": [
{"type": "string", "value": "hi"},
{"type": "integer", "value": "42"}
]
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/array/mixed-int-string.toml 0000664 0000000 0000000 00000000036 15261432440 0032144 0 ustar 00root root 0000000 0000000 strings-and-ints = ["hi", 42]
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/array/mixed-string-table.json 0000664 0000000 0000000 00000001005 15261432440 0032434 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-b3b679b/tests/data/valid/_external/toml-test/valid/array/mixed-string-table.toml 0000664 0000000 0000000 00000000754 15261432440 0032450 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-b3b679b/tests/data/valid/_external/toml-test/valid/array/nested-double.json 0000664 0000000 0000000 00000000350 15261432440 0031471 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-b3b679b/tests/data/valid/_external/toml-test/valid/array/nested-double.toml 0000664 0000000 0000000 00000000050 15261432440 0031470 0 ustar 00root root 0000000 0000000 nest = [
[
["a"],
[1, 2, [3]]
]
]
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/array/nested-inline-table.json 0000664 0000000 0000000 00000000047 15261432440 0032565 0 ustar 00root root 0000000 0000000 {
"a": [{
"b": {}
}]
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/array/nested-inline-table.toml 0000664 0000000 0000000 00000000023 15261432440 0032561 0 ustar 00root root 0000000 0000000 a = [ { b = {} } ]
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/array/nested.json 0000664 0000000 0000000 00000000157 15261432440 0030226 0 ustar 00root root 0000000 0000000 {
"nest": [
[{"type": "string", "value": "a"}],
[{"type": "string", "value": "b"}]
]
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/array/nested.toml 0000664 0000000 0000000 00000000026 15261432440 0030223 0 ustar 00root root 0000000 0000000 nest = [["a"], ["b"]]
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/array/nospaces.json 0000664 0000000 0000000 00000000230 15261432440 0030547 0 ustar 00root root 0000000 0000000 {
"ints": [
{"type": "integer", "value": "1"},
{"type": "integer", "value": "2"},
{"type": "integer", "value": "3"}
]
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/array/nospaces.toml 0000664 0000000 0000000 00000000017 15261432440 0030554 0 ustar 00root root 0000000 0000000 ints = [1,2,3]
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/array/open-parent-table.json 0000664 0000000 0000000 00000000220 15261432440 0032250 0 ustar 00root root 0000000 0000000 {
"parent-table": {
"not-arr": {"type": "integer", "value": "1"},
"arr": [
{},
{}
]
}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/array/open-parent-table.toml 0000664 0000000 0000000 00000000105 15261432440 0032254 0 ustar 00root root 0000000 0000000 [[parent-table.arr]]
[[parent-table.arr]]
[parent-table]
not-arr = 1
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/array/string-quote-comma-01.json 0000664 0000000 0000000 00000000217 15261432440 0032712 0 ustar 00root root 0000000 0000000 {
"title": [
{"type": "string", "value": "Client: \"XXXX\", Job: XXXX"},
{"type": "string", "value": "Code: XXXX"}
]
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/array/string-quote-comma-01.toml 0000664 0000000 0000000 00000000070 15261432440 0032711 0 ustar 00root root 0000000 0000000 title = [
"Client: \"XXXX\", Job: XXXX",
"Code: XXXX"
]
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/array/string-quote-comma-02.json 0000664 0000000 0000000 00000000070 15261432440 0032710 0 ustar 00root root 0000000 0000000 {
"title": [{"type": "string", "value": " \", "}]
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/array/string-quote-comma-02.toml 0000664 0000000 0000000 00000000024 15261432440 0032711 0 ustar 00root root 0000000 0000000 title = [ " \", ",]
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/array/string-with-comma-01.json 0000664 0000000 0000000 00000000213 15261432440 0032524 0 ustar 00root root 0000000 0000000 {
"title": [
{"type": "string", "value": "Client: XXXX, Job: XXXX"},
{"type": "string", "value": "Code: XXXX"}
]
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/array/string-with-comma-01.toml 0000664 0000000 0000000 00000000064 15261432440 0032532 0 ustar 00root root 0000000 0000000 title = [
"Client: XXXX, Job: XXXX",
"Code: XXXX"
]
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/array/string-with-comma-02.json 0000664 0000000 0000000 00000000214 15261432440 0032526 0 ustar 00root root 0000000 0000000 {
"title": [
{"type": "string", "value": "Client: XXXX,\nJob: XXXX"},
{"type": "string", "value": "Code: XXXX"}
]
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/array/string-with-comma-02.toml 0000664 0000000 0000000 00000000070 15261432440 0032530 0 ustar 00root root 0000000 0000000 title = [
"""Client: XXXX,
Job: XXXX""",
"Code: XXXX"
]
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/array/strings.json 0000664 0000000 0000000 00000000335 15261432440 0030433 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-b3b679b/tests/data/valid/_external/toml-test/valid/array/strings.toml 0000664 0000000 0000000 00000000103 15261432440 0030426 0 ustar 00root root 0000000 0000000 string_array = [ "all", 'strings', """are the same""", '''type''']
table-array-string-backslash.json 0000664 0000000 0000000 00000000123 15261432440 0034316 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/array {
"foo": [{
"bar": {"type": "string", "value": "\"{{baz}}\""}
}]
}
table-array-string-backslash.toml 0000664 0000000 0000000 00000000037 15261432440 0034324 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/array foo = [ { bar="\"{{baz}}\""} ]
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/array/trailing-comma.json 0000664 0000000 0000000 00000000475 15261432440 0031652 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-b3b679b/tests/data/valid/_external/toml-test/valid/array/trailing-comma.toml 0000664 0000000 0000000 00000000101 15261432440 0031636 0 ustar 00root root 0000000 0000000 arr-1 = [1,]
arr-2 = [2,3,]
arr-3 = [4,
]
arr-4 = [
5,
6,
]
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/bool/ 0000775 0000000 0000000 00000000000 15261432440 0025663 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/bool/bool.json 0000664 0000000 0000000 00000000134 15261432440 0027507 0 ustar 00root root 0000000 0000000 {
"f": {"type": "bool", "value": "false"},
"t": {"type": "bool", "value": "true"}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/bool/bool.toml 0000664 0000000 0000000 00000000023 15261432440 0027506 0 ustar 00root root 0000000 0000000 t = true
f = false
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/comment/ 0000775 0000000 0000000 00000000000 15261432440 0026372 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/comment/after-literal-no-ws.json 0000664 0000000 0000000 00000000304 15261432440 0033056 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-b3b679b/tests/data/valid/_external/toml-test/valid/comment/after-literal-no-ws.toml 0000664 0000000 0000000 00000000107 15261432440 0033061 0 ustar 00root root 0000000 0000000 inf=inf#infinity
nan=nan#not a number
true=true#true
false=false#false
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/comment/at-eof.json 0000664 0000000 0000000 00000000064 15261432440 0030440 0 ustar 00root root 0000000 0000000 {
"key": {"type": "string", "value": "value"}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/comment/at-eof.toml 0000664 0000000 0000000 00000000125 15261432440 0030440 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-b3b679b/tests/data/valid/_external/toml-test/valid/comment/at-eof2.json 0000664 0000000 0000000 00000000064 15261432440 0030522 0 ustar 00root root 0000000 0000000 {
"key": {"type": "string", "value": "value"}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/comment/at-eof2.toml 0000664 0000000 0000000 00000000125 15261432440 0030522 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-b3b679b/tests/data/valid/_external/toml-test/valid/comment/everywhere.json 0000664 0000000 0000000 00000000776 15261432440 0031464 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-b3b679b/tests/data/valid/_external/toml-test/valid/comment/everywhere.toml 0000664 0000000 0000000 00000001213 15261432440 0031451 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-b3b679b/tests/data/valid/_external/toml-test/valid/comment/noeol.json 0000664 0000000 0000000 00000000003 15261432440 0030372 0 ustar 00root root 0000000 0000000 {}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/comment/noeol.toml 0000664 0000000 0000000 00000000053 15261432440 0030401 0 ustar 00root root 0000000 0000000 # single comment without any eol characters hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/comment/nonascii.json 0000664 0000000 0000000 00000000003 15261432440 0031061 0 ustar 00root root 0000000 0000000 {}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/comment/nonascii.toml 0000664 0000000 0000000 00000000040 15261432440 0031064 0 ustar 00root root 0000000 0000000 # ~ ÿ 𐀀
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/comment/tricky.json 0000664 0000000 0000000 00000002205 15261432440 0030571 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-b3b679b/tests/data/valid/_external/toml-test/valid/comment/tricky.toml 0000664 0000000 0000000 00000000601 15261432440 0030571 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-b3b679b/tests/data/valid/_external/toml-test/valid/datetime/ 0000775 0000000 0000000 00000000000 15261432440 0026524 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/datetime/datetime.json 0000664 0000000 0000000 00000000213 15261432440 0031207 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-b3b679b/tests/data/valid/_external/toml-test/valid/datetime/datetime.toml 0000664 0000000 0000000 00000000173 15261432440 0031216 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-b3b679b/tests/data/valid/_external/toml-test/valid/datetime/edge.json 0000664 0000000 0000000 00000000677 15261432440 0030335 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-b3b679b/tests/data/valid/_external/toml-test/valid/datetime/edge.toml 0000664 0000000 0000000 00000000300 15261432440 0030316 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-b3b679b/tests/data/valid/_external/toml-test/valid/datetime/invalid-date-in-string.json0000664 0000000 0000000 00000000070 15261432440 0033665 0 ustar 00root root 0000000 0000000 {
"s": {"type": "string", "value": "2020-01-01x"}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/datetime/invalid-date-in-string.toml0000664 0000000 0000000 00000000022 15261432440 0033664 0 ustar 00root root 0000000 0000000 s = '2020-01-01x'
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/datetime/leap-year.json 0000664 0000000 0000000 00000000751 15261432440 0031301 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-b3b679b/tests/data/valid/_external/toml-test/valid/datetime/leap-year.toml 0000664 0000000 0000000 00000000355 15261432440 0031303 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-b3b679b/tests/data/valid/_external/toml-test/valid/datetime/local-date.json 0000664 0000000 0000000 00000000105 15261432440 0031420 0 ustar 00root root 0000000 0000000 {
"bestdayever": {"type": "date-local", "value": "1987-07-05"}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/datetime/local-date.toml 0000664 0000000 0000000 00000000031 15261432440 0031420 0 ustar 00root root 0000000 0000000 bestdayever = 1987-07-05
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/datetime/local-time.json 0000664 0000000 0000000 00000000211 15261432440 0031437 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-b3b679b/tests/data/valid/_external/toml-test/valid/datetime/local-time.toml 0000664 0000000 0000000 00000000064 15261432440 0031447 0 ustar 00root root 0000000 0000000 besttimeever = 17:45:00
milliseconds = 10:32:00.555
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/datetime/local.json 0000664 0000000 0000000 00000000342 15261432440 0030510 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-b3b679b/tests/data/valid/_external/toml-test/valid/datetime/local.toml 0000664 0000000 0000000 00000000130 15261432440 0030505 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-b3b679b/tests/data/valid/_external/toml-test/valid/datetime/milliseconds.json 0000664 0000000 0000000 00000000455 15261432440 0032110 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-b3b679b/tests/data/valid/_external/toml-test/valid/datetime/milliseconds.toml 0000664 0000000 0000000 00000000212 15261432440 0032101 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-b3b679b/tests/data/valid/_external/toml-test/valid/datetime/no-seconds.json 0000664 0000000 0000000 00000000503 15261432440 0031465 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-b3b679b/tests/data/valid/_external/toml-test/valid/datetime/no-seconds.toml 0000664 0000000 0000000 00000000276 15261432440 0031476 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-b3b679b/tests/data/valid/_external/toml-test/valid/datetime/timezone.json 0000664 0000000 0000000 00000000436 15261432440 0031254 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-b3b679b/tests/data/valid/_external/toml-test/valid/datetime/timezone.toml 0000664 0000000 0000000 00000000206 15261432440 0031251 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-b3b679b/tests/data/valid/_external/toml-test/valid/empty-crlf.json 0000664 0000000 0000000 00000000003 15261432440 0027676 0 ustar 00root root 0000000 0000000 {}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/empty-crlf.toml 0000664 0000000 0000000 00000000002 15261432440 0027677 0 ustar 00root root 0000000 0000000
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/empty-lf.json 0000664 0000000 0000000 00000000003 15261432440 0027351 0 ustar 00root root 0000000 0000000 {}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/empty-lf.toml 0000664 0000000 0000000 00000000001 15261432440 0027351 0 ustar 00root root 0000000 0000000
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/empty-nothing.json 0000664 0000000 0000000 00000000003 15261432440 0030416 0 ustar 00root root 0000000 0000000 {}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/empty-nothing.toml 0000664 0000000 0000000 00000000000 15261432440 0030415 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/empty-space.json 0000664 0000000 0000000 00000000003 15261432440 0030043 0 ustar 00root root 0000000 0000000 {}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/empty-space.toml 0000664 0000000 0000000 00000000001 15261432440 0030043 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/empty-tab.json 0000664 0000000 0000000 00000000003 15261432440 0027516 0 ustar 00root root 0000000 0000000 {}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/empty-tab.toml 0000664 0000000 0000000 00000000001 15261432440 0027516 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/example.json 0000664 0000000 0000000 00000000520 15261432440 0027253 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-b3b679b/tests/data/valid/_external/toml-test/valid/example.toml 0000664 0000000 0000000 00000000133 15261432440 0027255 0 ustar 00root root 0000000 0000000 best-day-ever = 1987-07-05T17:45:00Z
[numtheory]
boring = false
perfection = [6, 28, 496]
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/float/ 0000775 0000000 0000000 00000000000 15261432440 0026035 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/float/exponent.json 0000664 0000000 0000000 00000000667 15261432440 0030601 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-b3b679b/tests/data/valid/_external/toml-test/valid/float/exponent.toml 0000664 0000000 0000000 00000000162 15261432440 0030571 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-b3b679b/tests/data/valid/_external/toml-test/valid/float/float.json 0000664 0000000 0000000 00000000526 15261432440 0030040 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-b3b679b/tests/data/valid/_external/toml-test/valid/float/float.toml 0000664 0000000 0000000 00000000134 15261432440 0030035 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-b3b679b/tests/data/valid/_external/toml-test/valid/float/inf-and-nan.json 0000664 0000000 0000000 00000000524 15261432440 0031017 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-b3b679b/tests/data/valid/_external/toml-test/valid/float/inf-and-nan.toml 0000664 0000000 0000000 00000000350 15261432440 0031016 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-b3b679b/tests/data/valid/_external/toml-test/valid/float/long.json 0000664 0000000 0000000 00000000210 15261432440 0027660 0 ustar 00root root 0000000 0000000 {
"longpi": {"type": "float", "value": "3.141592653589793"},
"neglongpi": {"type": "float", "value": "-3.141592653589793"}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/float/long.toml 0000664 0000000 0000000 00000000072 15261432440 0027670 0 ustar 00root root 0000000 0000000 longpi = 3.141592653589793
neglongpi = -3.141592653589793
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/float/max-int.json 0000664 0000000 0000000 00000000206 15261432440 0030303 0 ustar 00root root 0000000 0000000 {
"max_float": {"type": "float", "value": "9007199254740991"},
"min_float": {"type": "float", "value": "-9007199254740991"}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/float/max-int.toml 0000664 0000000 0000000 00000000166 15261432440 0030312 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-b3b679b/tests/data/valid/_external/toml-test/valid/float/underscore.json 0000664 0000000 0000000 00000000253 15261432440 0031101 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-b3b679b/tests/data/valid/_external/toml-test/valid/float/underscore.toml 0000664 0000000 0000000 00000000070 15261432440 0031100 0 ustar 00root root 0000000 0000000 before = 3_141.5927
after = 3141.592_7
exponent = 3e1_4
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/float/zero.json 0000664 0000000 0000000 00000000651 15261432440 0027711 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-b3b679b/tests/data/valid/_external/toml-test/valid/float/zero.toml 0000664 0000000 0000000 00000000212 15261432440 0027704 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-b3b679b/tests/data/valid/_external/toml-test/valid/implicit-and-explicit-after.json 0000664 0000000 0000000 00000000302 15261432440 0033106 0 ustar 00root root 0000000 0000000 {
"a": {
"better": {"type": "integer", "value": "43"},
"b": {
"c": {
"answer": {"type": "integer", "value": "42"}
}
}
}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/implicit-and-explicit-after.toml 0000664 0000000 0000000 00000000045 15261432440 0033114 0 ustar 00root root 0000000 0000000 [a.b.c]
answer = 42
[a]
better = 43
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/implicit-and-explicit-before.json 0000664 0000000 0000000 00000000302 15261432440 0033247 0 ustar 00root root 0000000 0000000 {
"a": {
"better": {"type": "integer", "value": "43"},
"b": {
"c": {
"answer": {"type": "integer", "value": "42"}
}
}
}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/implicit-and-explicit-before.toml 0000664 0000000 0000000 00000000045 15261432440 0033255 0 ustar 00root root 0000000 0000000 [a]
better = 43
[a.b.c]
answer = 42
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/implicit-groups.json 0000664 0000000 0000000 00000000214 15261432440 0030747 0 ustar 00root root 0000000 0000000 {
"a": {
"b": {
"c": {
"answer": {"type": "integer", "value": "42"}
}
}
}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/implicit-groups.toml 0000664 0000000 0000000 00000000024 15261432440 0030750 0 ustar 00root root 0000000 0000000 [a.b.c]
answer = 42
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/inline-table/ 0000775 0000000 0000000 00000000000 15261432440 0027273 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/inline-table/array-01.json 0000664 0000000 0000000 00000001175 15261432440 0031526 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-b3b679b/tests/data/valid/_external/toml-test/valid/inline-table/array-01.toml 0000664 0000000 0000000 00000000310 15261432440 0031516 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-b3b679b/tests/data/valid/_external/toml-test/valid/inline-table/array-02.json 0000664 0000000 0000000 00000000027 15261432440 0031522 0 ustar 00root root 0000000 0000000 {
"a": {"a": []}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/inline-table/array-02.toml 0000664 0000000 0000000 00000000154 15261432440 0031525 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-b3b679b/tests/data/valid/_external/toml-test/valid/inline-table/array-03.json 0000664 0000000 0000000 00000000402 15261432440 0031520 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-b3b679b/tests/data/valid/_external/toml-test/valid/inline-table/array-03.toml 0000664 0000000 0000000 00000000056 15261432440 0031527 0 ustar 00root root 0000000 0000000 b = { a = [
1,
2,
], b = [
3,
4,
]}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/inline-table/bool.json 0000664 0000000 0000000 00000000165 15261432440 0031123 0 ustar 00root root 0000000 0000000 {
"a": {
"a": {"type": "bool", "value": "true"},
"b": {"type": "bool", "value": "false"}
}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/inline-table/bool.toml 0000664 0000000 0000000 00000000032 15261432440 0031116 0 ustar 00root root 0000000 0000000 a = {a = true, b = false}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/inline-table/empty.json 0000664 0000000 0000000 00000000643 15261432440 0031327 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-b3b679b/tests/data/valid/_external/toml-test/valid/inline-table/empty.toml 0000664 0000000 0000000 00000000303 15261432440 0031322 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-b3b679b/tests/data/valid/_external/toml-test/valid/inline-table/end-in-bool.json 0000664 0000000 0000000 00000000352 15261432440 0032271 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-b3b679b/tests/data/valid/_external/toml-test/valid/inline-table/end-in-bool.toml 0000664 0000000 0000000 00000000106 15261432440 0032270 0 ustar 00root root 0000000 0000000 black = { python=">3.6", version=">=18.9b0", allow_prereleases=true }
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/inline-table/inline-table.json 0000664 0000000 0000000 00000001071 15261432440 0032530 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-b3b679b/tests/data/valid/_external/toml-test/valid/inline-table/inline-table.toml 0000664 0000000 0000000 00000000263 15261432440 0032534 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-b3b679b/tests/data/valid/_external/toml-test/valid/inline-table/key-dotted-01.json 0000664 0000000 0000000 00000000731 15261432440 0032456 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-b3b679b/tests/data/valid/_external/toml-test/valid/inline-table/key-dotted-01.toml 0000664 0000000 0000000 00000000170 15261432440 0032455 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-b3b679b/tests/data/valid/_external/toml-test/valid/inline-table/key-dotted-02.json 0000664 0000000 0000000 00000001022 15261432440 0032451 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-b3b679b/tests/data/valid/_external/toml-test/valid/inline-table/key-dotted-02.toml 0000664 0000000 0000000 00000000064 15261432440 0032460 0 ustar 00root root 0000000 0000000 many.dots.here.dot.dot.dot = {a.b.c = 1, a.b.d = 2}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/inline-table/key-dotted-03.json 0000664 0000000 0000000 00000000773 15261432440 0032466 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-b3b679b/tests/data/valid/_external/toml-test/valid/inline-table/key-dotted-03.toml 0000664 0000000 0000000 00000000057 15261432440 0032463 0 ustar 00root root 0000000 0000000 [tbl]
a.b.c = {d.e=1}
[tbl.x]
a.b.c = {d.e=1}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/inline-table/key-dotted-04.json 0000664 0000000 0000000 00000001126 15261432440 0032460 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-b3b679b/tests/data/valid/_external/toml-test/valid/inline-table/key-dotted-04.toml 0000664 0000000 0000000 00000000101 15261432440 0032452 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-b3b679b/tests/data/valid/_external/toml-test/valid/inline-table/key-dotted-05.json 0000664 0000000 0000000 00000001437 15261432440 0032466 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-b3b679b/tests/data/valid/_external/toml-test/valid/inline-table/key-dotted-05.toml 0000664 0000000 0000000 00000000165 15261432440 0032465 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-b3b679b/tests/data/valid/_external/toml-test/valid/inline-table/key-dotted-06.json 0000664 0000000 0000000 00000001004 15261432440 0032455 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-b3b679b/tests/data/valid/_external/toml-test/valid/inline-table/key-dotted-06.toml 0000664 0000000 0000000 00000000072 15261432440 0032463 0 ustar 00root root 0000000 0000000 top.dot.dot = [
{dot.dot.dot = 1},
{dot.dot.dot = 2},
]
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/inline-table/key-dotted-07.json 0000664 0000000 0000000 00000000223 15261432440 0032460 0 ustar 00root root 0000000 0000000 {
"arr": [{
"a": {"b": [{
"c": {
"d": {"type": "integer", "value": "1"}
}
}]}
}]
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/inline-table/key-dotted-07.toml 0000664 0000000 0000000 00000000037 15261432440 0032465 0 ustar 00root root 0000000 0000000 arr = [
{a.b = [{c.d = 1}]}
]
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/inline-table/multiline.json 0000664 0000000 0000000 00000000374 15261432440 0032174 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-b3b679b/tests/data/valid/_external/toml-test/valid/inline-table/multiline.toml 0000664 0000000 0000000 00000000130 15261432440 0032164 0 ustar 00root root 0000000 0000000 tbl_multiline = { a = 1, b = """
multiline
""", c = """and yet
another line""", d = 4 }
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/inline-table/nest.json 0000664 0000000 0000000 00000001250 15261432440 0031135 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-b3b679b/tests/data/valid/_external/toml-test/valid/inline-table/nest.toml 0000664 0000000 0000000 00000000564 15261432440 0031146 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-b3b679b/tests/data/valid/_external/toml-test/valid/inline-table/newline-comment.json 0000664 0000000 0000000 00000001150 15261432440 0033264 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-b3b679b/tests/data/valid/_external/toml-test/valid/inline-table/newline-comment.toml 0000664 0000000 0000000 00000000715 15261432440 0033274 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-b3b679b/tests/data/valid/_external/toml-test/valid/inline-table/newline.json 0000664 0000000 0000000 00000001601 15261432440 0031625 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-b3b679b/tests/data/valid/_external/toml-test/valid/inline-table/newline.toml 0000664 0000000 0000000 00000000571 15261432440 0031634 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-b3b679b/tests/data/valid/_external/toml-test/valid/inline-table/spaces.json 0000664 0000000 0000000 00000001167 15261432440 0031451 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-b3b679b/tests/data/valid/_external/toml-test/valid/inline-table/spaces.toml 0000664 0000000 0000000 00000000452 15261432440 0031447 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-b3b679b/tests/data/valid/_external/toml-test/valid/integer/ 0000775 0000000 0000000 00000000000 15261432440 0026365 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/integer/float64-max.json 0000664 0000000 0000000 00000000206 15261432440 0031320 0 ustar 00root root 0000000 0000000 {
"max_int": {"type": "integer", "value": "9007199254740991"},
"min_int": {"type": "integer", "value": "-9007199254740991"}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/integer/float64-max.toml 0000664 0000000 0000000 00000000227 15261432440 0031325 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-b3b679b/tests/data/valid/_external/toml-test/valid/integer/integer.json 0000664 0000000 0000000 00000000327 15261432440 0030717 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-b3b679b/tests/data/valid/_external/toml-test/valid/integer/integer.toml 0000664 0000000 0000000 00000000065 15261432440 0030720 0 ustar 00root root 0000000 0000000 answer = 42
posanswer = +42
neganswer = -42
zero = 0
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/integer/literals.json 0000664 0000000 0000000 00000000723 15261432440 0031101 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-b3b679b/tests/data/valid/_external/toml-test/valid/integer/literals.toml 0000664 0000000 0000000 00000000227 15261432440 0031102 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-b3b679b/tests/data/valid/_external/toml-test/valid/integer/long.json 0000664 0000000 0000000 00000000230 15261432440 0030212 0 ustar 00root root 0000000 0000000 {
"int64-max": {"type": "integer", "value": "9223372036854775807"},
"int64-max-neg": {"type": "integer", "value": "-9223372036854775808"}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/integer/long.toml 0000664 0000000 0000000 00000000235 15261432440 0030221 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-b3b679b/tests/data/valid/_external/toml-test/valid/integer/underscore.json 0000664 0000000 0000000 00000000147 15261432440 0031433 0 ustar 00root root 0000000 0000000 {
"kilo": {"type": "integer", "value": "1000"},
"x": {"type": "integer", "value": "1111"}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/integer/underscore.toml 0000664 0000000 0000000 00000000031 15261432440 0031425 0 ustar 00root root 0000000 0000000 kilo = 1_000
x = 1_1_1_1
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/integer/zero.json 0000664 0000000 0000000 00000001037 15261432440 0030240 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-b3b679b/tests/data/valid/_external/toml-test/valid/integer/zero.toml 0000664 0000000 0000000 00000000172 15261432440 0030241 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-b3b679b/tests/data/valid/_external/toml-test/valid/key/ 0000775 0000000 0000000 00000000000 15261432440 0025520 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/key/alphanum.json 0000664 0000000 0000000 00000001131 15261432440 0030214 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-b3b679b/tests/data/valid/_external/toml-test/valid/key/alphanum.toml 0000664 0000000 0000000 00000000255 15261432440 0030224 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-b3b679b/tests/data/valid/_external/toml-test/valid/key/case-sensitive.json 0000664 0000000 0000000 00000001036 15261432440 0031335 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-b3b679b/tests/data/valid/_external/toml-test/valid/key/case-sensitive.toml 0000664 0000000 0000000 00000000313 15261432440 0031334 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-b3b679b/tests/data/valid/_external/toml-test/valid/key/dotted-01.json 0000664 0000000 0000000 00000000502 15261432440 0030111 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-b3b679b/tests/data/valid/_external/toml-test/valid/key/dotted-01.toml 0000664 0000000 0000000 00000000111 15261432440 0030107 0 ustar 00root root 0000000 0000000 name.first = "Arthur"
"name".'last' = "Dent"
many.dots.dot.dot.dot = 42
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/key/dotted-02.json 0000664 0000000 0000000 00000001133 15261432440 0030113 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-b3b679b/tests/data/valid/_external/toml-test/valid/key/dotted-02.toml 0000664 0000000 0000000 00000000504 15261432440 0030116 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-b3b679b/tests/data/valid/_external/toml-test/valid/key/dotted-03.json 0000664 0000000 0000000 00000000734 15261432440 0030122 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-b3b679b/tests/data/valid/_external/toml-test/valid/key/dotted-03.toml 0000664 0000000 0000000 00000000137 15261432440 0030121 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-b3b679b/tests/data/valid/_external/toml-test/valid/key/dotted-04.json 0000664 0000000 0000000 00000001007 15261432440 0030115 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-b3b679b/tests/data/valid/_external/toml-test/valid/key/dotted-04.toml 0000664 0000000 0000000 00000000077 15261432440 0030125 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-b3b679b/tests/data/valid/_external/toml-test/valid/key/dotted-empty.json 0000664 0000000 0000000 00000000362 15261432440 0031033 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-b3b679b/tests/data/valid/_external/toml-test/valid/key/dotted-empty.toml 0000664 0000000 0000000 00000000074 15261432440 0031035 0 ustar 00root root 0000000 0000000 ''.x = "empty.x"
x."" = "x.empty"
[a]
"".'' = "empty.empty"
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/key/empty-01.json 0000664 0000000 0000000 00000000061 15261432440 0027764 0 ustar 00root root 0000000 0000000 {
"": {"type": "string", "value": "blank"}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/key/empty-01.toml 0000664 0000000 0000000 00000000015 15261432440 0027765 0 ustar 00root root 0000000 0000000 "" = "blank"
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/key/empty-02.json 0000664 0000000 0000000 00000000061 15261432440 0027765 0 ustar 00root root 0000000 0000000 {
"": {"type": "string", "value": "blank"}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/key/empty-02.toml 0000664 0000000 0000000 00000000015 15261432440 0027766 0 ustar 00root root 0000000 0000000 '' = "blank"
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/key/empty-03.json 0000664 0000000 0000000 00000000056 15261432440 0027772 0 ustar 00root root 0000000 0000000 {
"": {"type": "integer", "value": "0"}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/key/empty-03.toml 0000664 0000000 0000000 00000000005 15261432440 0027766 0 ustar 00root root 0000000 0000000 ''=0
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/key/equals-nospace.json 0000664 0000000 0000000 00000000065 15261432440 0031334 0 ustar 00root root 0000000 0000000 {
"answer": {"type": "integer", "value": "42"}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/key/equals-nospace.toml 0000664 0000000 0000000 00000000012 15261432440 0031326 0 ustar 00root root 0000000 0000000 answer=42
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/key/escapes.json 0000664 0000000 0000000 00000000621 15261432440 0030035 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-b3b679b/tests/data/valid/_external/toml-test/valid/key/escapes.toml 0000664 0000000 0000000 00000000243 15261432440 0030037 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-b3b679b/tests/data/valid/_external/toml-test/valid/key/like-date.json 0000664 0000000 0000000 00000001662 15261432440 0030257 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-b3b679b/tests/data/valid/_external/toml-test/valid/key/like-date.toml 0000664 0000000 0000000 00000000771 15261432440 0030261 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-b3b679b/tests/data/valid/_external/toml-test/valid/key/numeric-01.json 0000664 0000000 0000000 00000000057 15261432440 0030275 0 ustar 00root root 0000000 0000000 {
"1": {"type": "bool", "value": "true"}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/key/numeric-01.toml 0000664 0000000 0000000 00000000015 15261432440 0030271 0 ustar 00root root 0000000 0000000 1 = true
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/key/numeric-02.json 0000664 0000000 0000000 00000000104 15261432440 0030267 0 ustar 00root root 0000000 0000000 {
"1": {
"2": {"type": "bool", "value": "true"}
}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/key/numeric-02.toml 0000664 0000000 0000000 00000000015 15261432440 0030272 0 ustar 00root root 0000000 0000000 1.2 = true
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/key/numeric-03.json 0000664 0000000 0000000 00000000062 15261432440 0030273 0 ustar 00root root 0000000 0000000 {
"0123": {"type": "bool", "value": "true"}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/key/numeric-03.toml 0000664 0000000 0000000 00000000015 15261432440 0030273 0 ustar 00root root 0000000 0000000 0123 = true
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/key/numeric-04.json 0000664 0000000 0000000 00000000106 15261432440 0030273 0 ustar 00root root 0000000 0000000 {
"01": {
"23": {"type": "bool", "value": "true"}
}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/key/numeric-04.toml 0000664 0000000 0000000 00000000015 15261432440 0030274 0 ustar 00root root 0000000 0000000 01.23 = true
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/key/numeric-05.json 0000664 0000000 0000000 00000000106 15261432440 0030274 0 ustar 00root root 0000000 0000000 {
"23": {
"01": {"type": "bool", "value": "true"}
}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/key/numeric-05.toml 0000664 0000000 0000000 00000000015 15261432440 0030275 0 ustar 00root root 0000000 0000000 23.01 = true
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/key/numeric-06.json 0000664 0000000 0000000 00000000060 15261432440 0030274 0 ustar 00root root 0000000 0000000 {
"-1": {"type": "bool", "value": "true"}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/key/numeric-06.toml 0000664 0000000 0000000 00000000015 15261432440 0030276 0 ustar 00root root 0000000 0000000 -1 = true
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/key/numeric-07.json 0000664 0000000 0000000 00000000061 15261432440 0030276 0 ustar 00root root 0000000 0000000 {
"-01": {"type": "bool", "value": "true"}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/key/numeric-07.toml 0000664 0000000 0000000 00000000015 15261432440 0030277 0 ustar 00root root 0000000 0000000 -01 = true
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/key/numeric-08.json 0000664 0000000 0000000 00000000144 15261432440 0030301 0 ustar 00root root 0000000 0000000 {
"01": {"type": "string", "value": "zero one"},
"1": {"type": "string", "value": "one"}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/key/numeric-08.toml 0000664 0000000 0000000 00000000033 15261432440 0030300 0 ustar 00root root 0000000 0000000 1 = 'one'
01 = 'zero one'
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/key/quoted-dots.json 0000664 0000000 0000000 00000000746 15261432440 0030672 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-b3b679b/tests/data/valid/_external/toml-test/valid/key/quoted-dots.toml 0000664 0000000 0000000 00000000207 15261432440 0030664 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-b3b679b/tests/data/valid/_external/toml-test/valid/key/quoted-unicode.json 0000664 0000000 0000000 00000000625 15261432440 0031343 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-b3b679b/tests/data/valid/_external/toml-test/valid/key/quoted-unicode.toml 0000664 0000000 0000000 00000000372 15261432440 0031344 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-b3b679b/tests/data/valid/_external/toml-test/valid/key/space.json 0000664 0000000 0000000 00000000474 15261432440 0027513 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-b3b679b/tests/data/valid/_external/toml-test/valid/key/space.toml 0000664 0000000 0000000 00000000234 15261432440 0027507 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-b3b679b/tests/data/valid/_external/toml-test/valid/key/special-chars.json 0000664 0000000 0000000 00000000142 15261432440 0031126 0 ustar 00root root 0000000 0000000 {
"=~!@$^\u0026*()_+-`1234567890[]|/?\u003e\u003c.,;:'=": {"type": "integer", "value": "1"}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/key/special-chars.toml 0000664 0000000 0000000 00000000054 15261432440 0031132 0 ustar 00root root 0000000 0000000 "=~!@$^&*()_+-`1234567890[]|/?><.,;:'=" = 1
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/key/special-word.json 0000664 0000000 0000000 00000000342 15261432440 0031003 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-b3b679b/tests/data/valid/_external/toml-test/valid/key/special-word.toml 0000664 0000000 0000000 00000000111 15261432440 0030777 0 ustar 00root root 0000000 0000000 false = false
true = 1
inf = 100000000
nan = "ceci n'est pas un nombre"
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/key/start.json 0000664 0000000 0000000 00000001500 15261432440 0027544 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-b3b679b/tests/data/valid/_external/toml-test/valid/key/start.toml 0000664 0000000 0000000 00000000432 15261432440 0027551 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-b3b679b/tests/data/valid/_external/toml-test/valid/key/zero.json 0000664 0000000 0000000 00000000057 15261432440 0027374 0 ustar 00root root 0000000 0000000 {
"0": {"type": "integer", "value": "0"}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/key/zero.toml 0000664 0000000 0000000 00000000004 15261432440 0027366 0 ustar 00root root 0000000 0000000 0=0
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/multibyte.json 0000664 0000000 0000000 00000002040 15261432440 0027635 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-b3b679b/tests/data/valid/_external/toml-test/valid/multibyte.toml 0000664 0000000 0000000 00000002204 15261432440 0027641 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-b3b679b/tests/data/valid/_external/toml-test/valid/newline-crlf.json 0000664 0000000 0000000 00000000152 15261432440 0030206 0 ustar 00root root 0000000 0000000 {
"newline": {"type": "string", "value": "crlf"},
"os": {"type": "string", "value": "DOS"}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/newline-crlf.toml 0000664 0000000 0000000 00000000036 15261432440 0030211 0 ustar 00root root 0000000 0000000 os = "DOS"
newline = "crlf"
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/newline-lf.json 0000664 0000000 0000000 00000000151 15261432440 0027660 0 ustar 00root root 0000000 0000000 {
"newline": {"type": "string", "value": "lf"},
"os": {"type": "string", "value": "unix"}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/newline-lf.toml 0000664 0000000 0000000 00000000033 15261432440 0027661 0 ustar 00root root 0000000 0000000 os = "unix"
newline = "lf"
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/ 0000775 0000000 0000000 00000000000 15261432440 0026315 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-0.json 0000664 0000000 0000000 00000000177 15261432440 0030642 0 ustar 00root root 0000000 0000000 {
"another": {"type": "string", "value": "# This is not a comment"},
"key": {"type": "string", "value": "value"}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-0.toml 0000664 0000000 0000000 00000000172 15261432440 0030637 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-1.json 0000664 0000000 0000000 00000000064 15261432440 0030636 0 ustar 00root root 0000000 0000000 {
"key": {"type": "string", "value": "value"}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-1.toml 0000664 0000000 0000000 00000000016 15261432440 0030635 0 ustar 00root root 0000000 0000000 key = "value"
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-10.json 0000664 0000000 0000000 00000000566 15261432440 0030725 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-10.toml 0000664 0000000 0000000 00000000221 15261432440 0030713 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-11.json 0000664 0000000 0000000 00000000110 15261432440 0030707 0 ustar 00root root 0000000 0000000 {
"3": {
"14159": {"type": "string", "value": "pi"}
}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-11.toml 0000664 0000000 0000000 00000000017 15261432440 0030717 0 ustar 00root root 0000000 0000000 3.14159 = "pi"
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-12.json 0000664 0000000 0000000 00000000155 15261432440 0030721 0 ustar 00root root 0000000 0000000 {
"str": {"type": "string", "value": "I'm a string. \"You can quote me\". Name\tJosé\nLocation\tSF."}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-12.toml 0000664 0000000 0000000 00000000111 15261432440 0030713 0 ustar 00root root 0000000 0000000 str = "I'm a string. \"You can quote me\". Name\tJos\xE9\nLocation\tSF."
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-13.json 0000664 0000000 0000000 00000000117 15261432440 0030720 0 ustar 00root root 0000000 0000000 {
"str1": {"type": "string", "value": "Roses are red\nViolets are blue"}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-13.toml 0000664 0000000 0000000 00000000055 15261432440 0030723 0 ustar 00root root 0000000 0000000 str1 = """
Roses are red
Violets are blue"""
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-14.json 0000664 0000000 0000000 00000000235 15261432440 0030722 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-14.toml 0000664 0000000 0000000 00000000343 15261432440 0030724 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-15.json 0000664 0000000 0000000 00000000416 15261432440 0030724 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-15.toml 0000664 0000000 0000000 00000000423 15261432440 0030724 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-16.json 0000664 0000000 0000000 00000000607 15261432440 0030727 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-16.toml 0000664 0000000 0000000 00000000553 15261432440 0030731 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-17.json 0000664 0000000 0000000 00000000464 15261432440 0030731 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-17.toml 0000664 0000000 0000000 00000000256 15261432440 0030732 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-18.json 0000664 0000000 0000000 00000000334 15261432440 0030726 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-18.toml 0000664 0000000 0000000 00000000227 15261432440 0030731 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-19.json 0000664 0000000 0000000 00000000444 15261432440 0030731 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-19.toml 0000664 0000000 0000000 00000000444 15261432440 0030733 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-20.json 0000664 0000000 0000000 00000000303 15261432440 0030713 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-20.toml 0000664 0000000 0000000 00000000051 15261432440 0030715 0 ustar 00root root 0000000 0000000 int1 = +99
int2 = 42
int3 = 0
int4 = -17
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-21.json 0000664 0000000 0000000 00000000322 15261432440 0030715 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-21.toml 0000664 0000000 0000000 00000000172 15261432440 0030722 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-22.json 0000664 0000000 0000000 00000000501 15261432440 0030715 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-22.toml 0000664 0000000 0000000 00000000337 15261432440 0030726 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-23.json 0000664 0000000 0000000 00000000533 15261432440 0030723 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-23.toml 0000664 0000000 0000000 00000000177 15261432440 0030731 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-24.json 0000664 0000000 0000000 00000000077 15261432440 0030727 0 ustar 00root root 0000000 0000000 {
"flt8": {"type": "float", "value": "224617.445991228"}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-24.toml 0000664 0000000 0000000 00000000033 15261432440 0030721 0 ustar 00root root 0000000 0000000 flt8 = 224_617.445_991_228
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-25.json 0000664 0000000 0000000 00000000430 15261432440 0030721 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-25.toml 0000664 0000000 0000000 00000000424 15261432440 0030726 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-26.json 0000664 0000000 0000000 00000000144 15261432440 0030724 0 ustar 00root root 0000000 0000000 {
"bool1": {"type": "bool", "value": "true"},
"bool2": {"type": "bool", "value": "false"}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-26.toml 0000664 0000000 0000000 00000000033 15261432440 0030723 0 ustar 00root root 0000000 0000000 bool1 = true
bool2 = false
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-27.json 0000664 0000000 0000000 00000000444 15261432440 0030730 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-27.toml 0000664 0000000 0000000 00000000205 15261432440 0030725 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-28.json 0000664 0000000 0000000 00000000106 15261432440 0030724 0 ustar 00root root 0000000 0000000 {
"odt4": {"type": "datetime", "value": "1979-05-27T07:32:00Z"}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-28.toml 0000664 0000000 0000000 00000000034 15261432440 0030726 0 ustar 00root root 0000000 0000000 odt4 = 1979-05-27 07:32:00Z
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-29.json 0000664 0000000 0000000 00000000216 15261432440 0030727 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-29.toml 0000664 0000000 0000000 00000000067 15261432440 0030735 0 ustar 00root root 0000000 0000000 odt5 = 1979-05-27 07:32Z
odt6 = 1979-05-27 07:32-07:00
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-3.json 0000664 0000000 0000000 00000000333 15261432440 0030637 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-3.toml 0000664 0000000 0000000 00000000103 15261432440 0030634 0 ustar 00root root 0000000 0000000 key = "value"
bare_key = "value"
bare-key = "value"
1234 = "value"
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-30.json 0000664 0000000 0000000 00000000341 15261432440 0030716 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-30.toml 0000664 0000000 0000000 00000000127 15261432440 0030722 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-31.json 0000664 0000000 0000000 00000000113 15261432440 0030714 0 ustar 00root root 0000000 0000000 {
"ldt3": {"type": "datetime-local", "value": "1979-05-27T07:32:00"}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-31.toml 0000664 0000000 0000000 00000000030 15261432440 0030714 0 ustar 00root root 0000000 0000000 ldt3 = 1979-05-27T07:32
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-32.json 0000664 0000000 0000000 00000000075 15261432440 0030724 0 ustar 00root root 0000000 0000000 {
"ld1": {"type": "date-local", "value": "1979-05-27"}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-32.toml 0000664 0000000 0000000 00000000021 15261432440 0030715 0 ustar 00root root 0000000 0000000 ld1 = 1979-05-27
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-33.json 0000664 0000000 0000000 00000000261 15261432440 0030722 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-33.toml 0000664 0000000 0000000 00000000063 15261432440 0030724 0 ustar 00root root 0000000 0000000 lt1 = 07:32:00
lt2 = 00:32:00.5
lt3 = 00:32:00.999
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-34.json 0000664 0000000 0000000 00000000073 15261432440 0030724 0 ustar 00root root 0000000 0000000 {
"lt3": {"type": "time-local", "value": "07:32:00"}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-34.toml 0000664 0000000 0000000 00000000014 15261432440 0030721 0 ustar 00root root 0000000 0000000 lt3 = 07:32
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-35.json 0000664 0000000 0000000 00000003351 15261432440 0030727 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-35.toml 0000664 0000000 0000000 00000000665 15261432440 0030736 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-36.json 0000664 0000000 0000000 00000000414 15261432440 0030725 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-36.toml 0000664 0000000 0000000 00000000102 15261432440 0030721 0 ustar 00root root 0000000 0000000 integers2 = [
1, 2, 3
]
integers3 = [
1,
2, # this is ok
]
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-37.json 0000664 0000000 0000000 00000000024 15261432440 0030723 0 ustar 00root root 0000000 0000000 {
"table": {}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-37.toml 0000664 0000000 0000000 00000000010 15261432440 0030720 0 ustar 00root root 0000000 0000000 [table]
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-38.json 0000664 0000000 0000000 00000000426 15261432440 0030732 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-38.toml 0000664 0000000 0000000 00000000130 15261432440 0030724 0 ustar 00root root 0000000 0000000 [table-1]
key1 = "some string"
key2 = 123
[table-2]
key1 = "another string"
key2 = 456
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-39.json 0000664 0000000 0000000 00000000227 15261432440 0030732 0 ustar 00root root 0000000 0000000 {
"dog": {
"tater.man": {
"type": {
"name": {"type": "string", "value": "pug"}
}
}
}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-39.toml 0000664 0000000 0000000 00000000044 15261432440 0030731 0 ustar 00root root 0000000 0000000 [dog."tater.man"]
type.name = "pug"
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-4.json 0000664 0000000 0000000 00000000506 15261432440 0030642 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-4.toml 0000664 0000000 0000000 00000000164 15261432440 0030644 0 ustar 00root root 0000000 0000000 "127.0.0.1" = "value"
"character encoding" = "value"
"ʎǝʞ" = "value"
'key2' = "value"
'quoted "value"' = "value"
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-40.json 0000664 0000000 0000000 00000000400 15261432440 0030713 0 ustar 00root root 0000000 0000000 {
"a": {
"b": {
"c": {}
}
},
"d": {
"e": {
"f": {}
}
},
"g": {
"h": {
"i": {}
}
},
"j": {
"ʞ": {
"l": {}
}
}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-40.toml 0000664 0000000 0000000 00000000240 15261432440 0030717 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-41.json 0000664 0000000 0000000 00000000147 15261432440 0030724 0 ustar 00root root 0000000 0000000 {
"x": {
"y": {
"z": {
"w": {}
}
}
}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-41.toml 0000664 0000000 0000000 00000000170 15261432440 0030722 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-42.json 0000664 0000000 0000000 00000000126 15261432440 0030722 0 ustar 00root root 0000000 0000000 {
"animal": {},
"fruit": {
"apple": {},
"orange": {}
}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-42.toml 0000664 0000000 0000000 00000000076 15261432440 0030730 0 ustar 00root root 0000000 0000000 # VALID BUT DISCOURAGED
[fruit.apple]
[animal]
[fruit.orange]
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-43.json 0000664 0000000 0000000 00000000126 15261432440 0030723 0 ustar 00root root 0000000 0000000 {
"animal": {},
"fruit": {
"apple": {},
"orange": {}
}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-43.toml 0000664 0000000 0000000 00000000064 15261432440 0030726 0 ustar 00root root 0000000 0000000 # RECOMMENDED
[fruit.apple]
[fruit.orange]
[animal]
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-44.json 0000664 0000000 0000000 00000000410 15261432440 0030720 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-44.toml 0000664 0000000 0000000 00000000210 15261432440 0030720 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-45.json 0000664 0000000 0000000 00000000317 15261432440 0030727 0 ustar 00root root 0000000 0000000 {
"fruit": {
"apple": {
"color": {"type": "string", "value": "red"},
"taste": {
"sweet": {"type": "bool", "value": "true"}
}
}
}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-45.toml 0000664 0000000 0000000 00000000323 15261432440 0030726 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-46.json 0000664 0000000 0000000 00000000463 15261432440 0030732 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-46.toml 0000664 0000000 0000000 00000000261 15261432440 0030730 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-47.json 0000664 0000000 0000000 00000001326 15261432440 0030732 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-47.toml 0000664 0000000 0000000 00000000454 15261432440 0030735 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-48.json 0000664 0000000 0000000 00000001326 15261432440 0030733 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-48.toml 0000664 0000000 0000000 00000000354 15261432440 0030735 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-49.json 0000664 0000000 0000000 00000000157 15261432440 0030735 0 ustar 00root root 0000000 0000000 {
"product": {
"type": {
"name": {"type": "string", "value": "Nail"}
}
}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-49.toml 0000664 0000000 0000000 00000000104 15261432440 0030727 0 ustar 00root root 0000000 0000000 [product]
type = { name = "Nail" }
# type.edible = false # INVALID
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-50.json 0000664 0000000 0000000 00000000157 15261432440 0030725 0 ustar 00root root 0000000 0000000 {
"product": {
"type": {
"name": {"type": "string", "value": "Nail"}
}
}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-50.toml 0000664 0000000 0000000 00000000104 15261432440 0030717 0 ustar 00root root 0000000 0000000 [product]
type.name = "Nail"
# type = { edible = false } # INVALID
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-51.json 0000664 0000000 0000000 00000000574 15261432440 0030731 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-51.toml 0000664 0000000 0000000 00000000224 15261432440 0030723 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-52.json 0000664 0000000 0000000 00000001317 15261432440 0030726 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-52.toml 0000664 0000000 0000000 00000000417 15261432440 0030730 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-53.json 0000664 0000000 0000000 00000001051 15261432440 0030722 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-53.toml 0000664 0000000 0000000 00000000155 15261432440 0030730 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-6.json 0000664 0000000 0000000 00000000412 15261432440 0030640 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-6.toml 0000664 0000000 0000000 00000000134 15261432440 0030643 0 ustar 00root root 0000000 0000000 name = "Orange"
physical.color = "orange"
physical.shape = "round"
site."google.com" = true
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-7.json 0000664 0000000 0000000 00000000303 15261432440 0030640 0 ustar 00root root 0000000 0000000 {
"fruit": {
"color": {"type": "string", "value": "yellow"},
"flavor": {"type": "string", "value": "banana"},
"name": {"type": "string", "value": "banana"}
}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-7.toml 0000664 0000000 0000000 00000000231 15261432440 0030642 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-8.json 0000664 0000000 0000000 00000000243 15261432440 0030644 0 ustar 00root root 0000000 0000000 {
"fruit": {
"orange": {"type": "integer", "value": "2"},
"apple": {
"smooth": {"type": "bool", "value": "true"}
}
}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-8.toml 0000664 0000000 0000000 00000000213 15261432440 0030643 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-9.json 0000664 0000000 0000000 00000000566 15261432440 0030655 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-1.1.0/common-9.toml 0000664 0000000 0000000 00000000234 15261432440 0030647 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-example-1-compact.json 0000664 0000000 0000000 00000002541 15261432440 0031772 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-example-1-compact.toml 0000664 0000000 0000000 00000000570 15261432440 0031774 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-example-1.json 0000664 0000000 0000000 00000002541 15261432440 0030346 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-b3b679b/tests/data/valid/_external/toml-test/valid/spec-example-1.toml 0000664 0000000 0000000 00000001057 15261432440 0030351 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-b3b679b/tests/data/valid/_external/toml-test/valid/string/ 0000775 0000000 0000000 00000000000 15261432440 0026236 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/string/basic-escape-01.json 0000664 0000000 0000000 00000000067 15261432440 0031671 0 ustar 00root root 0000000 0000000 {
"test": {"type": "string", "value": "\"one\""}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/string/basic-escape-01.toml 0000664 0000000 0000000 00000000034 15261432440 0031665 0 ustar 00root root 0000000 0000000 # Escape "
test = "\"one\""
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/string/basic-escape-02.json 0000664 0000000 0000000 00000000067 15261432440 0031672 0 ustar 00root root 0000000 0000000 {
"test": {"type": "string", "value": "\\\"one"}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/string/basic-escape-02.toml 0000664 0000000 0000000 00000000047 15261432440 0031672 0 ustar 00root root 0000000 0000000 # Escape \ and then "
test = "\\\"one"
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/string/basic-escape-03.json 0000664 0000000 0000000 00000000075 15261432440 0031672 0 ustar 00root root 0000000 0000000 {
"test": {"type": "string", "value": "\\\\\\\\\"one"}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/string/basic-escape-03.toml 0000664 0000000 0000000 00000000070 15261432440 0031667 0 ustar 00root root 0000000 0000000 # Escape \ four times and then "
test = "\\\\\\\\\"one"
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/string/empty.json 0000664 0000000 0000000 00000000062 15261432440 0030265 0 ustar 00root root 0000000 0000000 {
"answer": {"type": "string", "value": ""}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/string/empty.toml 0000664 0000000 0000000 00000000014 15261432440 0030264 0 ustar 00root root 0000000 0000000 answer = ""
ends-in-whitespace-escape.json 0000664 0000000 0000000 00000000074 15261432440 0034000 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/string {
"beee": {"type": "string", "value": "heeee\ngeeee"}
}
ends-in-whitespace-escape.toml 0000664 0000000 0000000 00000000046 15261432440 0034001 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/string beee = """
heeee
geeee\
"""
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/string/escape-esc.json 0000664 0000000 0000000 00000000120 15261432440 0031132 0 ustar 00root root 0000000 0000000 {
"esc": {"type": "string", "value": "\u001b There is no escape! \u001b"}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/string/escape-esc.toml 0000664 0000000 0000000 00000000042 15261432440 0031137 0 ustar 00root root 0000000 0000000 esc = "\e There is no escape! \e"
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/string/escape-tricky.json 0000664 0000000 0000000 00000001143 15261432440 0031673 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-b3b679b/tests/data/valid/_external/toml-test/valid/string/escape-tricky.toml 0000664 0000000 0000000 00000000510 15261432440 0031672 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-b3b679b/tests/data/valid/_external/toml-test/valid/string/escaped-escape.json 0000664 0000000 0000000 00000000067 15261432440 0031776 0 ustar 00root root 0000000 0000000 {
"answer": {"type": "string", "value": "\\x64"}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/string/escaped-escape.toml 0000664 0000000 0000000 00000000021 15261432440 0031766 0 ustar 00root root 0000000 0000000 answer = "\\x64"
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/string/escapes.json 0000664 0000000 0000000 00000001400 15261432440 0030547 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-b3b679b/tests/data/valid/_external/toml-test/valid/string/escapes.toml 0000664 0000000 0000000 00000000603 15261432440 0030555 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-b3b679b/tests/data/valid/_external/toml-test/valid/string/hex-escape.json 0000664 0000000 0000000 00000001141 15261432440 0031150 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-b3b679b/tests/data/valid/_external/toml-test/valid/string/hex-escape.toml 0000664 0000000 0000000 00000000667 15261432440 0031166 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-b3b679b/tests/data/valid/_external/toml-test/valid/string/multibyte-escape.json 0000664 0000000 0000000 00000000443 15261432440 0032406 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-b3b679b/tests/data/valid/_external/toml-test/valid/string/multibyte-escape.toml 0000664 0000000 0000000 00000000600 15261432440 0032403 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-b3b679b/tests/data/valid/_external/toml-test/valid/string/multibyte.json 0000664 0000000 0000000 00000000433 15261432440 0031147 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-b3b679b/tests/data/valid/_external/toml-test/valid/string/multibyte.toml 0000664 0000000 0000000 00000000324 15261432440 0031150 0 ustar 00root root 0000000 0000000 # Test each multibyte length: 2, 3, and 4 bytes:
# ɑ € 𐫱
basic = "ɑ € 𐫱 ɑ€𐫱"
raw = 'ɑ € 𐫱 ɑ€𐫱'
ml-basic = """ɑ € 𐫱 ɑ€𐫱"""
ml-raw = '''ɑ € 𐫱 ɑ€𐫱'''
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/string/multiline-empty.json 0000664 0000000 0000000 00000000303 15261432440 0032263 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-b3b679b/tests/data/valid/_external/toml-test/valid/string/multiline-empty.toml 0000664 0000000 0000000 00000000430 15261432440 0032266 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-b3b679b/tests/data/valid/_external/toml-test/valid/string/multiline-escaped-crlf.json 0000664 0000000 0000000 00000000055 15261432440 0033461 0 ustar 00root root 0000000 0000000 {
"0": {"type": "string", "value": ""}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/string/multiline-escaped-crlf.toml 0000664 0000000 0000000 00000000167 15261432440 0033467 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-b3b679b/tests/data/valid/_external/toml-test/valid/string/multiline-quotes.json 0000664 0000000 0000000 00000001621 15261432440 0032451 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-b3b679b/tests/data/valid/_external/toml-test/valid/string/multiline-quotes.toml 0000664 0000000 0000000 00000001230 15261432440 0032447 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-b3b679b/tests/data/valid/_external/toml-test/valid/string/multiline.json 0000664 0000000 0000000 00000001357 15261432440 0031141 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-b3b679b/tests/data/valid/_external/toml-test/valid/string/multiline.toml 0000664 0000000 0000000 00000001124 15261432440 0031133 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-b3b679b/tests/data/valid/_external/toml-test/valid/string/nl.json 0000664 0000000 0000000 00000000447 15261432440 0027547 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-b3b679b/tests/data/valid/_external/toml-test/valid/string/nl.toml 0000664 0000000 0000000 00000000163 15261432440 0027544 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-b3b679b/tests/data/valid/_external/toml-test/valid/string/quoted-unicode.json 0000664 0000000 0000000 00000000713 15261432440 0032057 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-b3b679b/tests/data/valid/_external/toml-test/valid/string/quoted-unicode.toml 0000664 0000000 0000000 00000000514 15261432440 0032060 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-b3b679b/tests/data/valid/_external/toml-test/valid/string/raw-empty.json 0000664 0000000 0000000 00000000061 15261432440 0031053 0 ustar 00root root 0000000 0000000 {
"empty": {"type": "string", "value": ""}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/string/raw-empty.toml 0000664 0000000 0000000 00000000013 15261432440 0031052 0 ustar 00root root 0000000 0000000 empty = ''
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/string/raw-multiline.json 0000664 0000000 0000000 00000001036 15261432440 0031722 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-b3b679b/tests/data/valid/_external/toml-test/valid/string/raw-multiline.toml 0000664 0000000 0000000 00000001047 15261432440 0031726 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-b3b679b/tests/data/valid/_external/toml-test/valid/string/raw.json 0000664 0000000 0000000 00000001403 15261432440 0027720 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-b3b679b/tests/data/valid/_external/toml-test/valid/string/raw.toml 0000664 0000000 0000000 00000000665 15261432440 0027733 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-b3b679b/tests/data/valid/_external/toml-test/valid/string/simple.json 0000664 0000000 0000000 00000000125 15261432440 0030420 0 ustar 00root root 0000000 0000000 {
"answer": {"type": "string", "value": "You are not drinking enough whisky."}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/string/simple.toml 0000664 0000000 0000000 00000000057 15261432440 0030426 0 ustar 00root root 0000000 0000000 answer = "You are not drinking enough whisky."
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/string/start-mb.json 0000664 0000000 0000000 00000000476 15261432440 0030671 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-b3b679b/tests/data/valid/_external/toml-test/valid/string/start-mb.toml 0000664 0000000 0000000 00000000303 15261432440 0030660 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-b3b679b/tests/data/valid/_external/toml-test/valid/string/unicode-escape.json 0000664 0000000 0000000 00000001363 15261432440 0032020 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-b3b679b/tests/data/valid/_external/toml-test/valid/string/unicode-escape.toml 0000664 0000000 0000000 00000000524 15261432440 0032020 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-b3b679b/tests/data/valid/_external/toml-test/valid/string/with-pound.json 0000664 0000000 0000000 00000000252 15261432440 0031226 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-b3b679b/tests/data/valid/_external/toml-test/valid/string/with-pound.toml 0000664 0000000 0000000 00000000161 15261432440 0031227 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-b3b679b/tests/data/valid/_external/toml-test/valid/table/ 0000775 0000000 0000000 00000000000 15261432440 0026017 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/table/array-empty-name.json 0000664 0000000 0000000 00000000167 15261432440 0032106 0 ustar 00root root 0000000 0000000 {
"": [
{"a": {"type": "integer", "value": "1"}},
{"a": {"type": "integer", "value": "2"}}
]
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/table/array-empty-name.toml 0000664 0000000 0000000 00000000073 15261432440 0032104 0 ustar 00root root 0000000 0000000 # Silly thing to do, but valid.
[['']]
a = 1
[['']]
a = 2
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/table/array-empty.json 0000664 0000000 0000000 00000000022 15261432440 0031156 0 ustar 00root root 0000000 0000000 {
"a": [{}]
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/table/array-empty.toml 0000664 0000000 0000000 00000000006 15261432440 0031162 0 ustar 00root root 0000000 0000000 [[a]]
array-implicit-and-explicit-after.json 0000664 0000000 0000000 00000000223 15261432440 0035234 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/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 15261432440 0035233 0 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/table [[a.b]]
x = 1
[a]
y = 2
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/table/array-implicit.json 0000664 0000000 0000000 00000000141 15261432440 0031634 0 ustar 00root root 0000000 0000000 {
"albums": {"songs": [{
"name": {"type": "string", "value": "Glory Days"}
}]}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/table/array-implicit.toml 0000664 0000000 0000000 00000000045 15261432440 0031641 0 ustar 00root root 0000000 0000000 [[albums.songs]]
name = "Glory Days"
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/table/array-many.json 0000664 0000000 0000000 00000000732 15261432440 0030774 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-b3b679b/tests/data/valid/_external/toml-test/valid/table/array-many.toml 0000664 0000000 0000000 00000000243 15261432440 0030773 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-b3b679b/tests/data/valid/_external/toml-test/valid/table/array-nest.json 0000664 0000000 0000000 00000001322 15261432440 0030775 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-b3b679b/tests/data/valid/_external/toml-test/valid/table/array-nest.toml 0000664 0000000 0000000 00000000406 15261432440 0031001 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-b3b679b/tests/data/valid/_external/toml-test/valid/table/array-one.json 0000664 0000000 0000000 00000000231 15261432440 0030603 0 ustar 00root root 0000000 0000000 {
"people": [{
"first_name": {"type": "string", "value": "Bruce"},
"last_name": {"type": "string", "value": "Springsteen"}
}]
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/table/array-one.toml 0000664 0000000 0000000 00000000072 15261432440 0030610 0 ustar 00root root 0000000 0000000 [[people]]
first_name = "Bruce"
last_name = "Springsteen"
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/table/array-table-array.json 0000664 0000000 0000000 00000000465 15261432440 0032236 0 ustar 00root root 0000000 0000000 {
"a": [{
"b": [
{
"c": {
"d": {"type": "string", "value": "val0"}
}
},
{
"c": {
"d": {"type": "string", "value": "val1"}
}
}
]
}]
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/table/array-table-array.toml 0000664 0000000 0000000 00000000154 15261432440 0032233 0 ustar 00root root 0000000 0000000 [[a]]
[[a.b]]
[a.b.c]
d = "val0"
[[a.b]]
[a.b.c]
d = "val1"
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/table/array-within-dotted.json 0000664 0000000 0000000 00000000320 15261432440 0032604 0 ustar 00root root 0000000 0000000 {
"fruit": {
"apple": {
"color": {"type": "string", "value": "red"},
"seeds": [{
"size": {"type": "integer", "value": "2"}
}]
}
}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/table/array-within-dotted.toml 0000664 0000000 0000000 00000000074 15261432440 0032614 0 ustar 00root root 0000000 0000000 [fruit]
apple.color = "red"
[[fruit.apple.seeds]]
size = 2
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/table/empty-name.json 0000664 0000000 0000000 00000000355 15261432440 0030771 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-b3b679b/tests/data/valid/_external/toml-test/valid/table/empty-name.toml 0000664 0000000 0000000 00000000047 15261432440 0030771 0 ustar 00root root 0000000 0000000 ['']
x = 1
["".a]
x = 2
[a.'']
x = 3
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/table/empty.json 0000664 0000000 0000000 00000000020 15261432440 0030040 0 ustar 00root root 0000000 0000000 {
"a": {}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/table/empty.toml 0000664 0000000 0000000 00000000004 15261432440 0030044 0 ustar 00root root 0000000 0000000 [a]
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/table/keyword-with-values.json 0000664 0000000 0000000 00000000422 15261432440 0032642 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-b3b679b/tests/data/valid/_external/toml-test/valid/table/keyword-with-values.toml 0000664 0000000 0000000 00000000066 15261432440 0032650 0 ustar 00root root 0000000 0000000 [true]
k = 1
[false]
k = 2
[inf]
k = 3
[nan]
k = 4
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/table/keyword.json 0000664 0000000 0000000 00000000107 15261432440 0030374 0 ustar 00root root 0000000 0000000 {
"false": {},
"inf": {},
"nan": {},
"true": {}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/table/keyword.toml 0000664 0000000 0000000 00000000040 15261432440 0030372 0 ustar 00root root 0000000 0000000 [true]
[false]
[inf]
[nan]
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/table/names-with-values.json 0000664 0000000 0000000 00000001620 15261432440 0032262 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-b3b679b/tests/data/valid/_external/toml-test/valid/table/names-with-values.toml 0000664 0000000 0000000 00000000240 15261432440 0032261 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-b3b679b/tests/data/valid/_external/toml-test/valid/table/names.json 0000664 0000000 0000000 00000000570 15261432440 0030017 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-b3b679b/tests/data/valid/_external/toml-test/valid/table/names.toml 0000664 0000000 0000000 00000000132 15261432440 0030013 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-b3b679b/tests/data/valid/_external/toml-test/valid/table/no-eol.json 0000664 0000000 0000000 00000000024 15261432440 0030077 0 ustar 00root root 0000000 0000000 {
"table": {}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/table/no-eol.toml 0000664 0000000 0000000 00000000010 15261432440 0030074 0 ustar 00root root 0000000 0000000 [table]
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/table/sub-empty.json 0000664 0000000 0000000 00000000045 15261432440 0030636 0 ustar 00root root 0000000 0000000 {
"a": {
"b": {}
}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/table/sub-empty.toml 0000664 0000000 0000000 00000000012 15261432440 0030632 0 ustar 00root root 0000000 0000000 [a]
[a.b]
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/table/sub.json 0000664 0000000 0000000 00000000370 15261432440 0027503 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-b3b679b/tests/data/valid/_external/toml-test/valid/table/sub.toml 0000664 0000000 0000000 00000000143 15261432440 0027503 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-b3b679b/tests/data/valid/_external/toml-test/valid/table/whitespace.json 0000664 0000000 0000000 00000000030 15261432440 0031037 0 ustar 00root root 0000000 0000000 {
"valid key": {}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/table/whitespace.toml 0000664 0000000 0000000 00000000016 15261432440 0031045 0 ustar 00root root 0000000 0000000 ["valid key"]
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/table/with-literal-string.json 0000664 0000000 0000000 00000000220 15261432440 0032615 0 ustar 00root root 0000000 0000000 {
"a": {
"\"b\"": {
"c": {
"answer": {"type": "integer", "value": "42"}
}
}
}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/table/with-literal-string.toml 0000664 0000000 0000000 00000000051 15261432440 0032621 0 ustar 00root root 0000000 0000000 ['a']
[a.'"b"']
[a.'"b"'.c]
answer = 42
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/table/with-pound.json 0000664 0000000 0000000 00000000122 15261432440 0031003 0 ustar 00root root 0000000 0000000 {
"key#group": {
"answer": {"type": "integer", "value": "42"}
}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/table/with-pound.toml 0000664 0000000 0000000 00000000032 15261432440 0031005 0 ustar 00root root 0000000 0000000 ["key#group"]
answer = 42
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/table/with-single-quotes.json 0000664 0000000 0000000 00000000214 15261432440 0032457 0 ustar 00root root 0000000 0000000 {
"a": {
"b": {
"c": {
"answer": {"type": "integer", "value": "42"}
}
}
}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/table/with-single-quotes.toml 0000664 0000000 0000000 00000000045 15261432440 0032463 0 ustar 00root root 0000000 0000000 ['a']
[a.'b']
[a.'b'.c]
answer = 42
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/table/without-super-with-values.json0000664 0000000 0000000 00000000517 15261432440 0034022 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-b3b679b/tests/data/valid/_external/toml-test/valid/table/without-super-with-values.toml0000664 0000000 0000000 00000000220 15261432440 0034013 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-b3b679b/tests/data/valid/_external/toml-test/valid/table/without-super.json 0000664 0000000 0000000 00000000147 15261432440 0031553 0 ustar 00root root 0000000 0000000 {
"x": {
"y": {
"z": {
"w": {}
}
}
}
}
hukkin-tomli-b3b679b/tests/data/valid/_external/toml-test/valid/table/without-super.toml 0000664 0000000 0000000 00000000170 15261432440 0031551 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-b3b679b/tests/data/valid/apostrophes-in-literal-string.json 0000664 0000000 0000000 00000000144 15261432440 0026523 0 ustar 00root root 0000000 0000000 {"this-str-has-apostrophes": {"type": "string", "value": "' there's one already\n'' two more\n''"}}
hukkin-tomli-b3b679b/tests/data/valid/apostrophes-in-literal-string.toml 0000664 0000000 0000000 00000000104 15261432440 0026521 0 ustar 00root root 0000000 0000000 this-str-has-apostrophes='''' there's one already
'' two more
'''''
hukkin-tomli-b3b679b/tests/data/valid/array/ 0000775 0000000 0000000 00000000000 15261432440 0021036 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/valid/array/array-subtables.json 0000664 0000000 0000000 00000000302 15261432440 0025024 0 ustar 00root root 0000000 0000000 {"arr":
{"type":"array","value":
[
{"subtab":
{"val": {"type":"integer","value":"1"}
}
},
{"subtab": {"val": {"type":"integer","value":"2"}}}
]
}
}
hukkin-tomli-b3b679b/tests/data/valid/array/array-subtables.toml 0000664 0000000 0000000 00000000067 15261432440 0025036 0 ustar 00root root 0000000 0000000 [[arr]]
[arr.subtab]
val=1
[[arr]]
[arr.subtab]
val=2
hukkin-tomli-b3b679b/tests/data/valid/array/open-parent-table.json 0000664 0000000 0000000 00000000167 15261432440 0025252 0 ustar 00root root 0000000 0000000 {
"parent-table": {
"arr": {"type":"array","value":[{},{}]},
"not-arr": {"type":"integer","value":"1"}
}
}
hukkin-tomli-b3b679b/tests/data/valid/array/open-parent-table.toml 0000664 0000000 0000000 00000000105 15261432440 0025244 0 ustar 00root root 0000000 0000000 [[parent-table.arr]]
[[parent-table.arr]]
[parent-table]
not-arr = 1
hukkin-tomli-b3b679b/tests/data/valid/boolean.json 0000664 0000000 0000000 00000000122 15261432440 0022225 0 ustar 00root root 0000000 0000000 {
"a": {"type":"bool","value":"true"},
"b": {"type":"bool","value":"false"}
}
hukkin-tomli-b3b679b/tests/data/valid/boolean.toml 0000664 0000000 0000000 00000000022 15261432440 0022226 0 ustar 00root root 0000000 0000000 'a'=true
"b"=false hukkin-tomli-b3b679b/tests/data/valid/dates-and-times/ 0000775 0000000 0000000 00000000000 15261432440 0022677 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/valid/dates-and-times/datetimes.json 0000664 0000000 0000000 00000000335 15261432440 0025552 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-b3b679b/tests/data/valid/dates-and-times/datetimes.toml 0000664 0000000 0000000 00000000137 15261432440 0025554 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-b3b679b/tests/data/valid/dates-and-times/localtime.json 0000664 0000000 0000000 00000000153 15261432440 0025542 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-b3b679b/tests/data/valid/dates-and-times/localtime.toml 0000664 0000000 0000000 00000000042 15261432440 0025541 0 ustar 00root root 0000000 0000000 t=00:00:00.99999999999999
t2=00:00 hukkin-tomli-b3b679b/tests/data/valid/five-quotes.json 0000664 0000000 0000000 00000000233 15261432440 0023060 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-b3b679b/tests/data/valid/five-quotes.toml 0000664 0000000 0000000 00000000141 15261432440 0023060 0 ustar 00root root 0000000 0000000 five-quotes = """
Closing with five quotes
"""""
four-quotes = """
Closing with four quotes
""""
hukkin-tomli-b3b679b/tests/data/valid/hex-char.json 0000664 0000000 0000000 00000000165 15261432440 0022314 0 ustar 00root root 0000000 0000000 {
"a": {"type":"string","value":"a"},
"b": {"type":"string","value":"b"},
"c": {"type":"string","value":"c"}
}
hukkin-tomli-b3b679b/tests/data/valid/hex-char.toml 0000664 0000000 0000000 00000000044 15261432440 0022312 0 ustar 00root root 0000000 0000000 a="\u0061"
b="\u0062"
c="\U00000063" hukkin-tomli-b3b679b/tests/data/valid/inline-table/ 0000775 0000000 0000000 00000000000 15261432440 0022263 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/valid/inline-table/empty-inline-table.json 0000664 0000000 0000000 00000000016 15261432440 0026652 0 ustar 00root root 0000000 0000000 {"empty": {}} hukkin-tomli-b3b679b/tests/data/valid/inline-table/empty-inline-table.toml 0000664 0000000 0000000 00000000043 15261432440 0026654 0 ustar 00root root 0000000 0000000 empty ={ }#nothing here
hukkin-tomli-b3b679b/tests/data/valid/inline-table/multiline-inline-table.json 0000664 0000000 0000000 00000000760 15261432440 0027524 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-b3b679b/tests/data/valid/inline-table/multiline-inline-table.toml 0000664 0000000 0000000 00000000234 15261432440 0027522 0 ustar 00root root 0000000 0000000 multiline = {
"a" = 1, "b" = 2,
c = [
1,
2,
3,
],# comment
d = 3,
e = 4, f = {
# comment
},
}
hukkin-tomli-b3b679b/tests/data/valid/multiline-basic-str/ 0000775 0000000 0000000 00000000000 15261432440 0023607 5 ustar 00root root 0000000 0000000 hukkin-tomli-b3b679b/tests/data/valid/multiline-basic-str/ends-in-whitespace-escape.json 0000664 0000000 0000000 00000000066 15261432440 0031431 0 ustar 00root root 0000000 0000000 {"beee": {"type": "string", "value": "heeee\ngeeee"}}
hukkin-tomli-b3b679b/tests/data/valid/multiline-basic-str/ends-in-whitespace-escape.toml 0000664 0000000 0000000 00000000046 15261432440 0031431 0 ustar 00root root 0000000 0000000 beee = """
heeee
geeee\
"""
hukkin-tomli-b3b679b/tests/data/valid/multiline-basic-str/replacements.json 0000664 0000000 0000000 00000000266 15261432440 0027170 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-b3b679b/tests/data/valid/multiline-basic-str/replacements.toml 0000664 0000000 0000000 00000000077 15261432440 0027172 0 ustar 00root root 0000000 0000000 escape = "\e"
tab = "\x09"
upper-j = "\x4a"
upper-j-2 = "\x4A"
hukkin-tomli-b3b679b/tests/data/valid/no-newlines.json 0000664 0000000 0000000 00000000003 15261432440 0023042 0 ustar 00root root 0000000 0000000 {}
hukkin-tomli-b3b679b/tests/data/valid/no-newlines.toml 0000664 0000000 0000000 00000000030 15261432440 0023044 0 ustar 00root root 0000000 0000000 #no newlines at all here hukkin-tomli-b3b679b/tests/data/valid/trailing-comma.json 0000664 0000000 0000000 00000000132 15261432440 0023512 0 ustar 00root root 0000000 0000000 {"arr":
{"type":"array","value":
[
{"type":"integer","value":"1"}
]
}
}
hukkin-tomli-b3b679b/tests/data/valid/trailing-comma.toml 0000664 0000000 0000000 00000000010 15261432440 0023507 0 ustar 00root root 0000000 0000000 arr=[1,] hukkin-tomli-b3b679b/tests/test_data.py 0000664 0000000 0000000 00000003231 15261432440 0020231 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-b3b679b/tests/test_error.py 0000664 0000000 0000000 00000007414 15261432440 0020460 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-b3b679b/tests/test_misc.py 0000664 0000000 0000000 00000013772 15261432440 0020266 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 subprocess
import sys
import tempfile
import textwrap
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 = 401
recursive_array_toml = "arr = " + nest_count * "[" + nest_count * "]"
tomllib.loads(recursive_array_toml)
nest_count = 402
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 = 402
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_key_recursion_limit(self):
nest_count = 310
nested_key_toml = "a." * nest_count + "a = 1"
tomllib.loads(nested_key_toml)
nest_count = sys.getrecursionlimit() - 2
nested_key_toml = "a." * nest_count + "a = 1"
tomllib.loads(nested_key_toml)
nest_count = sys.getrecursionlimit() + 2
nested_key_toml = "a." * nest_count + "a = 1"
with self.assertRaisesRegex(
RecursionError,
r"TOML key has more than the allowed [0-9]+ parts",
):
tomllib.loads(nested_key_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")
@unittest.skipUnless(
sys.version_info >= (3, 15) and tomllib._parser.__file__.endswith(".py"),
"need pure Python 3.15+",
)
def test_lazy_import(self):
# Test the TOML file can be parsed without importing regular
# expressions (tomli._re)
code = textwrap.dedent("""
import sys, tomli, textwrap
document = textwrap.dedent('''
[metadata]
key = "text"
array = ["array", "of", "text"]
booleans = [true, false]
''')
tomli.loads(document)
print("lazy import?", 'tomli._re' not in sys.modules)
""")
cmd = [sys.executable, "-c", code]
proc = subprocess.run(cmd, check=True, capture_output=True)
self.assertIn(b"lazy import? True", proc.stdout.rstrip())
hukkin-tomli-b3b679b/tomllib.md 0000664 0000000 0000000 00000004005 15261432440 0016531 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.
- Add the following to `cpython:Lib/tomllib/__init__.py`:
```python
# Pretend this exception was created here.
TOMLDecodeError.__module__ = __name__
```
- Restore `cpython:Lib/tomllib/mypy.ini`
- Examine the diff, and revert mypyc-related changes in code and tests.
hukkin-tomli-b3b679b/zizmor.yaml 0000664 0000000 0000000 00000000170 15261432440 0016762 0 ustar 00root root 0000000 0000000 rules:
archived-uses:
ignore:
# allow archived absolufy-imports, for now
- .pre-commit-config.yaml:24