{
	"books": [
		{
			"case": "The first author, by display name",
			"metadata": {
				"title": "Good Omens",
				"creators": [
					{
						"name": "Terry Pratchett",
						"roles": [
							"aut"
						],
						"fileAs": "Pratchett, Terry"
					},
					{
						"name": "Neil Gaiman",
						"roles": [
							"aut"
						]
					}
				]
			},
			"folder": "Terry Pratchett/Good Omens",
			"file": "Good Omens - Terry Pratchett.epub"
		},
		{
			"case": "An author after a translator in the OPF",
			"metadata": {
				"title": "The Stranger",
				"creators": [
					{
						"name": "Matthew Ward",
						"roles": [
							"trl"
						]
					},
					{
						"name": "Albert Camus",
						"roles": [
							"aut"
						]
					}
				]
			},
			"folder": "Albert Camus/The Stranger",
			"file": "The Stranger - Albert Camus.epub"
		},
		{
			"case": "An anthology's editor",
			"metadata": {
				"title": "Dangerous Visions",
				"creators": [
					{
						"name": "Harlan Ellison",
						"roles": [
							"edt"
						]
					},
					{
						"name": "Philip K. Dick",
						"roles": [
							"ctb"
						]
					}
				]
			},
			"folder": "Harlan Ellison/Dangerous Visions",
			"file": "Dangerous Visions - Harlan Ellison.epub"
		},
		{
			"case": "A creator without a role",
			"metadata": {
				"title": "Walden",
				"creators": [
					{
						"name": "Henry David Thoreau"
					}
				]
			},
			"folder": "Henry David Thoreau/Walden",
			"file": "Walden - Henry David Thoreau.epub"
		},
		{
			"case": "No author and no title",
			"metadata": {
				"title": ""
			},
			"folder": "Unknown Author/Untitled",
			"file": "Untitled - Unknown Author.epub"
		},
		{
			"case": "A colon, a slash, quotes, and a question mark",
			"metadata": {
				"title": "AC/DC: \"Live\"?",
				"creators": [
					{
						"name": "Murray Engleheart",
						"roles": [
							"aut"
						]
					}
				]
			},
			"folder": "Murray Engleheart/AC-DC - 'Live'",
			"file": "AC-DC - 'Live' - Murray Engleheart.epub"
		},
		{
			"case": "Trailing dots",
			"metadata": {
				"title": "Wait for It...",
				"creators": [
					{
						"name": "Jane Doe",
						"roles": [
							"aut"
						]
					}
				]
			},
			"folder": "Jane Doe/Wait for It",
			"file": "Wait for It - Jane Doe.epub"
		},
		{
			"case": "A reserved name",
			"metadata": {
				"title": "Con",
				"creators": [
					{
						"name": "Jane Doe",
						"roles": [
							"aut"
						]
					}
				]
			},
			"folder": "Jane Doe/Con_",
			"file": "Con_ - Jane Doe.epub"
		},
		{
			"case": "Decomposed Unicode, written in NFC",
			"metadata": {
				"title": "Café Society",
				"creators": [
					{
						"name": "Renée Martin",
						"roles": [
							"aut"
						]
					}
				]
			},
			"folder": "Renée Martin/Café Society",
			"file": "Café Society - Renée Martin.epub"
		},
		{
			"case": "A long title, shortened to 100 bytes",
			"metadata": {
				"title": "The Remarkable and Entirely True Account of an Unusually Long Voyage Across the Northern Seas and Back Again",
				"creators": [
					{
						"name": "Jane Doe",
						"roles": [
							"aut"
						]
					}
				]
			},
			"folder": "Jane Doe/The Remarkable and Entirely True Account of an Unusually Long Voyage Across the Northern Seas and Ba",
			"file": "The Remarkable and Entirely True Account of an Unusually Long Voyage Across the Nort - Jane Doe.epub"
		}
	],
	"editions": [
		{
			"case": "One ebook and one audiobook",
			"editions": [
				{
					"kind": "ebook",
					"metadata": {
						"title": "Dune",
						"language": "en"
					}
				},
				{
					"kind": "audiobook",
					"metadata": {
						"title": "Dune",
						"language": "en"
					}
				}
			],
			"folders": [
				"Ebook",
				"Audiobook"
			]
		},
		{
			"case": "Each step qualifies only the names still shared",
			"editions": [
				{
					"kind": "ebook",
					"metadata": {
						"title": "Dune",
						"language": "en",
						"published": "1965-08-01"
					}
				},
				{
					"kind": "ebook",
					"metadata": {
						"title": "Dune",
						"language": "en",
						"published": "2019-10-01"
					}
				},
				{
					"kind": "ebook",
					"metadata": {
						"title": "Duin",
						"language": "nl",
						"published": "2019-01-01"
					}
				}
			],
			"folders": [
				"Ebook (en, 1965)",
				"Ebook (en, 2019)",
				"Ebook (nl)"
			]
		},
		{
			"case": "Ebooks told apart by publisher",
			"editions": [
				{
					"kind": "ebook",
					"metadata": {
						"title": "Dune",
						"language": "en",
						"published": "2019",
						"publisher": "Ace"
					}
				},
				{
					"kind": "ebook",
					"metadata": {
						"title": "Dune",
						"language": "en",
						"published": "2019",
						"publisher": "Hodder"
					}
				}
			],
			"folders": [
				"Ebook (Ace)",
				"Ebook (Hodder)"
			]
		},
		{
			"case": "Audiobooks told apart by narrator",
			"editions": [
				{
					"kind": "audiobook",
					"metadata": {
						"title": "Dune",
						"language": "en",
						"creators": [
							{
								"name": "Frank Herbert",
								"roles": [
									"aut"
								]
							},
							{
								"name": "Scott Brick",
								"roles": [
									"nrt"
								]
							}
						]
					}
				},
				{
					"kind": "audiobook",
					"metadata": {
						"title": "Dune",
						"language": "en",
						"creators": [
							{
								"name": "Simon Vance",
								"roles": [
									"nrt"
								]
							}
						]
					}
				}
			],
			"folders": [
				"Audiobook (Scott Brick)",
				"Audiobook (Simon Vance)"
			]
		},
		{
			"case": "Nothing tells them apart: a number, in the order they were added",
			"editions": [
				{
					"kind": "ebook",
					"metadata": {
						"title": "Dune"
					}
				},
				{
					"kind": "ebook",
					"metadata": {
						"title": "Dune"
					}
				}
			],
			"folders": [
				"Ebook (1)",
				"Ebook (2)"
			]
		},
		{
			"case": "Values compared ignoring case",
			"editions": [
				{
					"kind": "ebook",
					"metadata": {
						"title": "Dune",
						"language": "en",
						"publisher": "ACE"
					}
				},
				{
					"kind": "ebook",
					"metadata": {
						"title": "Dune",
						"language": "EN",
						"publisher": "Hodder"
					}
				}
			],
			"folders": [
				"Ebook (ACE)",
				"Ebook (Hodder)"
			]
		},
		{
			"case": "An edition without a value at a step is told apart by having none",
			"editions": [
				{
					"kind": "ebook",
					"metadata": {
						"title": "Dune"
					}
				},
				{
					"kind": "ebook",
					"metadata": {
						"title": "Dune",
						"language": "en"
					}
				}
			],
			"folders": [
				"Ebook",
				"Ebook (en)"
			]
		}
	],
	"collisions": [
		{
			"case": "A book whose folder is taken gets its year",
			"name": "Dune",
			"year": "1965",
			"taken": [
				"Dune"
			],
			"result": "Dune (1965)"
		},
		{
			"case": "Then a number, from 2",
			"name": "Dune",
			"year": "1965",
			"taken": [
				"Dune",
				"Dune (1965)"
			],
			"result": "Dune (2)"
		},
		{
			"case": "Taken compares as names do, ignoring case",
			"name": "Dune",
			"year": null,
			"taken": [
				"DUNE"
			],
			"result": "Dune (2)"
		},
		{
			"case": "A long name is cut to fit its qualifier",
			"name": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
			"year": null,
			"taken": [
				"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
			],
			"result": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa (2)"
		}
	]
}
