From 3c747c3f703304a736ea7944a81797241c6d813b Mon Sep 17 00:00:00 2001 From: Dave Thaler Date: Sun, 7 Jan 2024 09:44:11 -0800 Subject: [PATCH 1/2] Add sample file testing FILE payloads Derived from file in https://github.com/gedcom7code/test-files/tree/main/7 Addresses part of issue #132 Signed-off-by: Dave Thaler --- _pages/tools.md | 1 + testfiles/gedcom70/filename-1.ged | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 testfiles/gedcom70/filename-1.ged diff --git a/_pages/tools.md b/_pages/tools.md index c715ca8..b1d93b6 100644 --- a/_pages/tools.md +++ b/_pages/tools.md @@ -47,6 +47,7 @@ The following files are provided for testing. | [escapes.ged](/testfiles/gedcom70/escapes.ged) | This file contains @ characters that are doubled only when they appear at the start of a line string. | | [extension-record.ged](/testfiles/gedcom70/extension-record.ged) | This file contains a `_LOC` record, which is referenced from an individual with a _LOC tag. | | [lang.ged](/testfiles/gedcom70/lang.ged) | This file contains many different `LANG` payloads. | +| [filename-1.ged](/testfiles/gedcom70/filename-1.ged) | This file contains many different `FILE` payloads. | | [long-url.ged](/testfiles/gedcom70/long-url.ged) | This file contains a URL of a submitter that is very long, to test the ability to parse very long lines. | | [maximal70.ged](/testfiles/gedcom70/maximal70.ged) | This file attempts to exercise all standard tags in various locations, and all standard enumeration values. | | [maximal70.gdz](/testfiles/gedcom70/maximal70.gdz) | This FamilySearch GEDZIP 7.0 file attempts to exercise all standard tags in various locations, and all standard enumeration values, and also includes a minimal local audio file. diff --git a/testfiles/gedcom70/filename-1.ged b/testfiles/gedcom70/filename-1.ged new file mode 100644 index 0000000..3ac5c1f --- /dev/null +++ b/testfiles/gedcom70/filename-1.ged @@ -0,0 +1,21 @@ +0 HEAD +1 GEDC +2 VERS 7.0 +0 @1@ OBJE +1 FILE file:///unix/absolute +2 FORM image/bmp +1 FILE file:///c:/windows/absolute +2 FORM image/bmp +1 FILE file://windows/server +2 FORM image/bmp +1 FILE a/relative/path +2 FORM image/bmp +1 FILE a/relative/path +2 FORM image/bmp +1 FILE most/paths%3Fget%23escaped%5Blike%5Dthis +2 FORM image/bmp +1 FILE https://leave.alone?with=args#and-frags +2 FORM image/bmp +1 FILE https%3a/not.a.url/even-though-similar +2 FORM image/bmp +0 TRLR From 2ba82225b8fb383a5fde47f24911abe2cc3caf9c Mon Sep 17 00:00:00 2001 From: Dave Thaler Date: Thu, 21 Mar 2024 11:44:12 -0700 Subject: [PATCH 2/2] Add explanatory NOTEs Signed-off-by: Dave Thaler --- testfiles/gedcom70/filename-1.ged | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/testfiles/gedcom70/filename-1.ged b/testfiles/gedcom70/filename-1.ged index 3ac5c1f..815384e 100644 --- a/testfiles/gedcom70/filename-1.ged +++ b/testfiles/gedcom70/filename-1.ged @@ -2,20 +2,33 @@ 1 GEDC 2 VERS 7.0 0 @1@ OBJE +1 NOTE Traditional file URI for a local file with an empty authority, per RFC 8089. 1 FILE file:///unix/absolute 2 FORM image/bmp +1 NOTE Local file URI with a Windows drive letter, per RFC 8089. 1 FILE file:///c:/windows/absolute 2 FORM image/bmp -1 FILE file://windows/server -2 FORM image/bmp -1 FILE a/relative/path +1 NOTE Non-local file URI, per RFC 8089. +1 FILE file://host.example.com/server 2 FORM image/bmp +1 NOTE URI reference for a local file, per RFC 3986. +2 CONT Using media/ as a directory prefix is recommended but not required. 1 FILE a/relative/path 2 FORM image/bmp +1 NOTE URI reference with percent escapes in a path segment, per RFC 3986. 1 FILE most/paths%3Fget%23escaped%5Blike%5Dthis 2 FORM image/bmp -1 FILE https://leave.alone?with=args#and-frags +1 NOTE Another URI reference with percent escapes that would be a URI if not escaped, per RFC 3986. +1 FILE https%3a//not.a.url/even-though-similar 2 FORM image/bmp -1 FILE https%3a/not.a.url/even-though-similar +1 NOTE Web-accessible file with path and fragment components, per RFC 3986. +1 FILE https://host.example.com?with=args#and-frags 2 FORM image/bmp +1 NOTE It is recommended that gedcom.ged and MANIFEST.MF and any URL beginning with META-INF/ not be used, but they're not disallowed. +1 FILE gedcom.ged +2 FORM text/vnd.familysearch.gedcom +1 FILE MANIFEST.MF +2 FORM text/plain +1 FILE META-INF/example +2 FORM text/plain 0 TRLR