diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2021-01-10 12:01:27 +0000 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2021-01-10 12:01:27 +0000 |
commit | 115f5897c02d26d4101658c2a34e116940d1fb6f (patch) | |
tree | 99a028f400d625a8892105b957f033159c9a7520 /subplotlib | |
parent | fc5723769e68e46c370b1050cc2b8faa5e79d9b4 (diff) | |
download | subplot-115f5897c02d26d4101658c2a34e116940d1fb6f.tar.gz |
subplotlib: Move steplibrary into share tree
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'subplotlib')
-rw-r--r-- | subplotlib/files.md | 2 | ||||
-rw-r--r-- | subplotlib/runcmd.md | 2 | ||||
-rw-r--r-- | subplotlib/steplibrary/datadir.yaml | 13 | ||||
-rw-r--r-- | subplotlib/steplibrary/files.yaml | 68 | ||||
-rw-r--r-- | subplotlib/steplibrary/runcmd.yaml | 89 | ||||
-rw-r--r-- | subplotlib/subplotlib.md | 2 |
6 files changed, 3 insertions, 173 deletions
diff --git a/subplotlib/files.md b/subplotlib/files.md index dc5c9b5..d005be5 100644 --- a/subplotlib/files.md +++ b/subplotlib/files.md @@ -3,7 +3,7 @@ title: Acceptance criteria for the files subplotlib step library author: The Subplot project template: rust bindings: - - steplibrary/files.yaml + - lib/files.yaml --- # Introduction diff --git a/subplotlib/runcmd.md b/subplotlib/runcmd.md index ee1c1d4..02b6540 100644 --- a/subplotlib/runcmd.md +++ b/subplotlib/runcmd.md @@ -3,7 +3,7 @@ title: Acceptance criteria for the runcmd step library for subplotlib. author: The Subplot project template: rust bindings: - - steplibrary/runcmd.yaml + - lib/runcmd.yaml --- # Introduction diff --git a/subplotlib/steplibrary/datadir.yaml b/subplotlib/steplibrary/datadir.yaml deleted file mode 100644 index acd4ad4..0000000 --- a/subplotlib/steplibrary/datadir.yaml +++ /dev/null @@ -1,13 +0,0 @@ -# Bindings for the datadir steps -# These steps are pretty simplistic since Datadir is mostly -# a utility context for use by other step libraries, however some -# of the capabilities are worth exporting as steps - -- given: datadir has at least {bytes}B of space - function: subplotlib::steplibrary::datadir::datadir_has_enough_space - types: - bytes: uint -- given: datadir has at least {megabytes}M of space - function: subplotlib::steplibrary::datadir::datadir_has_enough_space_megabytes - types: - megabytes: uint diff --git a/subplotlib/steplibrary/files.yaml b/subplotlib/steplibrary/files.yaml deleted file mode 100644 index 339e7cf..0000000 --- a/subplotlib/steplibrary/files.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# Bindings for the files steps -# These bind the files step library for subplotlib - -- given: file {embedded_file} - function: subplotlib::steplibrary::files::create_from_embedded - types: - embedded_file: file - -- given: file {filename_on_disk} from {embedded_file} - function: subplotlib::steplibrary::files::create_from_embedded_with_other_name - types: - embedded_file: file - -- given: file (?P<filename>\S+) has modification time (?P<mtime>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}) - regex: true - function: subplotlib::steplibrary::files::touch_with_timestamp - types: - mtime: text - -- when: I write "(?P<text>.*)" to file (?P<filename>\S+) - regex: true - function: subplotlib::steplibrary::files::create_from_text - -- when: I remember metadata for file {filename} - function: subplotlib::steplibrary::files::remember_metadata - -- when: I touch file {filename} - function: subplotlib::steplibrary::files::touch - -- then: file {filename} exists - function: subplotlib::steplibrary::files::file_exists - -- then: file {filename} does not exist - function: subplotlib::steplibrary::files::file_does_not_exist - -- then: only files (?P<filenames>.+) exist - function: subplotlib::steplibrary::files::only_these_exist - regex: true - -- then: file (?P<filename>\S+) contains "(?P<data>.*)" - regex: true - function: subplotlib::steplibrary::files::file_contains - -- then: file (?P<filename>\S+) matches regex /(?P<regex>.*)/ - regex: true - function: subplotlib::steplibrary::files::file_matches_regex - -- then: file (?P<filename>\S+) matches regex "(?P<regex>.*)" - regex: true - function: subplotlib::steplibrary::files::file_matches_regex - -- then: files {filename1} and {filename2} match - function: subplotlib::steplibrary::files::file_match - -- then: file {filename} has same metadata as before - function: subplotlib::steplibrary::files::has_remembered_metadata - -- then: file {filename} has different metadata from before - function: subplotlib::steplibrary::files::has_different_metadata - -- then: file {filename} has changed from before - function: subplotlib::steplibrary::files::has_different_metadata - -- then: file {filename} has a very recent modification time - function: subplotlib::steplibrary::files::mtime_is_recent - -- then: file {filename} has a very old modification time - function: subplotlib::steplibrary::files::mtime_is_ancient diff --git a/subplotlib/steplibrary/runcmd.yaml b/subplotlib/steplibrary/runcmd.yaml deleted file mode 100644 index 0a635c9..0000000 --- a/subplotlib/steplibrary/runcmd.yaml +++ /dev/null @@ -1,89 +0,0 @@ -# Bindings for the runcmd steplibrary - -- given: helper script {script} for runcmd - function: subplotlib::steplibrary::runcmd::helper_script - types: - script: file - -- given: srcdir is in the PATH - function: subplotlib::steplibrary::runcmd::helper_srcdir_path - -- when: I run (?P<argv0>\S+)(?P<args>.*) - regex: true - function: subplotlib::steplibrary::runcmd::run - -- when: I try to run (?P<argv0>\S+)(?P<args>.*) - regex: true - function: subplotlib::steplibrary::runcmd::try_to_run - -# Steps to examine exit code of latest command. - -- then: exit code is {exit} - function: subplotlib::steplibrary::runcmd::exit_code_is - types: - exit: int - -- then: exit code is not {exit} - function: subplotlib::steplibrary::runcmd::exit_code_is_not - types: - exit: int - -- then: command is successful - function: subplotlib::steplibrary::runcmd::exit_code_is_zero - -- then: command fails - function: subplotlib::steplibrary::runcmd::exit_code_is_nonzero - -# Steps to examine stdout/stderr for exact content. - -- then: stdout is exactly "(?P<text>.*)" - regex: true - function: subplotlib::steplibrary::runcmd::stdout_is - -- then: 'stdout isn''t exactly "(?P<text>.*)"' - regex: true - function: subplotlib::steplibrary::runcmd::stdout_isnt - -- then: stderr is exactly "(?P<text>.*)" - regex: true - function: subplotlib::steplibrary::runcmd::stderr_is - -- then: 'stderr isn''t exactly "(?P<text>.*)"' - regex: true - function: subplotlib::steplibrary::runcmd::stderr_isnt - -# Steps to examine stdout/stderr for sub-strings. - -- then: stdout contains "(?P<text>.*)" - regex: true - function: subplotlib::steplibrary::runcmd::stdout_contains - -- then: 'stdout doesn''t contain "(?P<text>.*)"' - regex: true - function: subplotlib::steplibrary::runcmd::stdout_doesnt_contain - -- then: stderr contains "(?P<text>.*)" - regex: true - function: subplotlib::steplibrary::runcmd::stderr_contains - -- then: 'stderr doesn''t contain "(?P<text>.*)"' - regex: true - function: subplotlib::steplibrary::runcmd::stderr_doesnt_contain - -# Steps to match stdout/stderr against regular expressions. - -- then: stdout matches regex (?P<regex>.*) - regex: true - function: subplotlib::steplibrary::runcmd::stdout_matches_regex - -- then: stdout doesn't match regex (?P<regex>.*) - regex: true - function: subplotlib::steplibrary::runcmd::stdout_doesnt_match_regex - -- then: stderr matches regex (?P<regex>.*) - regex: true - function: subplotlib::steplibrary::runcmd::stderr_matches_regex - -- then: stderr doesn't match regex (?P<regex>.*) - regex: true - function: subplotlib::steplibrary::runcmd::stderr_doesnt_match_regex diff --git a/subplotlib/subplotlib.md b/subplotlib/subplotlib.md index 4d59398..237ad03 100644 --- a/subplotlib/subplotlib.md +++ b/subplotlib/subplotlib.md @@ -3,7 +3,7 @@ title: Testing the Rust crate "subplotlib" template: rust bindings: - subplotlib.yaml - - steplibrary/datadir.yaml + - lib/datadir.yaml functions: - helpers/subplotlib_context.rs - helpers/subplotlib_impl.rs |