mirror of
https://github.com/cobalt-org/cobalt.rs
synced 2024-11-10 06:14:12 +00:00
test: Port all other tests to trycmd
This commit is contained in:
parent
978bb06cdc
commit
d64cda4e17
661 changed files with 773 additions and 345 deletions
|
@ -5,10 +5,21 @@ fn cli_tests() {
|
|||
#[cfg(not(feature = "syntax-highlight"))]
|
||||
{
|
||||
t.skip("tests/cmd/init.md");
|
||||
t.skip("tests/cmd/example.md");
|
||||
t.skip("tests/cmd/log_level.md");
|
||||
t.skip("tests/cmd/vimwiki_not_templated.md");
|
||||
}
|
||||
#[cfg(not(feature = "serve"))]
|
||||
{
|
||||
t.skip("tests/cmd/errors.md");
|
||||
}
|
||||
#[cfg(not(feature = "sass"))]
|
||||
{
|
||||
t.skip("tests/cmd/sass.md");
|
||||
t.skip("tests/cmd/sass_custom_config.md");
|
||||
}
|
||||
#[cfg(not(feature = "html-minifier"))]
|
||||
{
|
||||
t.skip("tests/cmd/example_minified.md");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
../fixtures/example
|
||||
example.in
|
17
tests/cmd/copy_files.md
Normal file
17
tests/cmd/copy_files.md
Normal file
|
@ -0,0 +1,17 @@
|
|||
```console
|
||||
$ cobalt -v build --destination _dest
|
||||
DEBUG: Using config file `[CWD]/_cobalt.yml`
|
||||
Building from `[CWD]` into `[CWD]/_dest`
|
||||
DEBUG: glob converted to regex: Glob { glob: "**/.*", re: "(?-u)^(?:/?|.*/)//.[^/]*$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Literal('.'), ZeroOrMore]) }
|
||||
DEBUG: glob converted to regex: Glob { glob: "**/_*", re: "(?-u)^(?:/?|.*/)_[^/]*$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Literal('_'), ZeroOrMore]) }
|
||||
DEBUG: built glob set; 6 literals, 0 basenames, 0 extensions, 0 prefixes, 0 suffixes, 0 required extensions, 2 regexes
|
||||
DEBUG: Loading data from `[CWD]/_data`
|
||||
DEBUG: glob converted to regex: Glob { glob: "**/.*", re: "(?-u)^(?:/?|.*/)//.[^/]*$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Literal('.'), ZeroOrMore]) }
|
||||
DEBUG: glob converted to regex: Glob { glob: "**/_*", re: "(?-u)^(?:/?|.*/)_[^/]*$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Literal('_'), ZeroOrMore]) }
|
||||
DEBUG: built glob set; 0 literals, 0 basenames, 0 extensions, 0 prefixes, 0 suffixes, 0 required extensions, 2 regexes
|
||||
DEBUG: Loading snippets from `[CWD]/_includes`
|
||||
DEBUG: Copying `[CWD]/some.js` to `[CWD]/_dest/some.js`
|
||||
DEBUG: Copying `[CWD]/style/blog.css` to `[CWD]/_dest/style/blog.css`
|
||||
Build successful
|
||||
|
||||
```
|
2
tests/cmd/custom_paths.in/_cobalt.yml
Normal file
2
tests/cmd/custom_paths.in/_cobalt.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
syntax_highlight:
|
||||
enabled: false
|
15
tests/cmd/custom_paths.md
Normal file
15
tests/cmd/custom_paths.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
```console
|
||||
$ cobalt -v build --destination _dest
|
||||
DEBUG: Using config file `[CWD]/_cobalt.yml`
|
||||
Building from `[CWD]` into `[CWD]/_dest`
|
||||
DEBUG: glob converted to regex: Glob { glob: "**/.*", re: "(?-u)^(?:/?|.*/)//.[^/]*$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Literal('.'), ZeroOrMore]) }
|
||||
DEBUG: glob converted to regex: Glob { glob: "**/_*", re: "(?-u)^(?:/?|.*/)_[^/]*$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Literal('_'), ZeroOrMore]) }
|
||||
DEBUG: built glob set; 6 literals, 0 basenames, 0 extensions, 0 prefixes, 0 suffixes, 0 required extensions, 2 regexes
|
||||
DEBUG: Loading data from `[CWD]/_data`
|
||||
DEBUG: glob converted to regex: Glob { glob: "**/.*", re: "(?-u)^(?:/?|.*/)//.[^/]*$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Literal('.'), ZeroOrMore]) }
|
||||
DEBUG: glob converted to regex: Glob { glob: "**/_*", re: "(?-u)^(?:/?|.*/)_[^/]*$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Literal('_'), ZeroOrMore]) }
|
||||
DEBUG: built glob set; 0 literals, 0 basenames, 0 extensions, 0 prefixes, 0 suffixes, 0 required extensions, 2 regexes
|
||||
DEBUG: Loading snippets from `[CWD]/_includes`
|
||||
Build successful
|
||||
|
||||
```
|
|
@ -1,3 +1,5 @@
|
|||
posts:
|
||||
default:
|
||||
permalink: "/blog/{{year}}/{{month}}/{{day}}/"
|
||||
syntax_highlight:
|
||||
enabled: false
|
15
tests/cmd/custom_post_path.md
Normal file
15
tests/cmd/custom_post_path.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
```console
|
||||
$ cobalt -v build --destination _dest
|
||||
DEBUG: Using config file `[CWD]/_cobalt.yml`
|
||||
Building from `[CWD]` into `[CWD]/_dest`
|
||||
DEBUG: glob converted to regex: Glob { glob: "**/.*", re: "(?-u)^(?:/?|.*/)//.[^/]*$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Literal('.'), ZeroOrMore]) }
|
||||
DEBUG: glob converted to regex: Glob { glob: "**/_*", re: "(?-u)^(?:/?|.*/)_[^/]*$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Literal('_'), ZeroOrMore]) }
|
||||
DEBUG: built glob set; 6 literals, 0 basenames, 0 extensions, 0 prefixes, 0 suffixes, 0 required extensions, 2 regexes
|
||||
DEBUG: Loading data from `[CWD]/_data`
|
||||
DEBUG: glob converted to regex: Glob { glob: "**/.*", re: "(?-u)^(?:/?|.*/)//.[^/]*$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Literal('.'), ZeroOrMore]) }
|
||||
DEBUG: glob converted to regex: Glob { glob: "**/_*", re: "(?-u)^(?:/?|.*/)_[^/]*$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Literal('_'), ZeroOrMore]) }
|
||||
DEBUG: built glob set; 0 literals, 0 basenames, 0 extensions, 0 prefixes, 0 suffixes, 0 required extensions, 2 regexes
|
||||
DEBUG: Loading snippets from `[CWD]/_includes`
|
||||
Build successful
|
||||
|
||||
```
|
4
tests/cmd/custom_posts_folder.in/_cobalt.yml
Normal file
4
tests/cmd/custom_posts_folder.in/_cobalt.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
posts:
|
||||
dir: blog
|
||||
syntax_highlight:
|
||||
enabled: false
|
15
tests/cmd/custom_posts_folder.md
Normal file
15
tests/cmd/custom_posts_folder.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
```console
|
||||
$ cobalt -v build --destination _dest
|
||||
DEBUG: Using config file `[CWD]/_cobalt.yml`
|
||||
Building from `[CWD]` into `[CWD]/_dest`
|
||||
DEBUG: glob converted to regex: Glob { glob: "**/.*", re: "(?-u)^(?:/?|.*/)//.[^/]*$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Literal('.'), ZeroOrMore]) }
|
||||
DEBUG: glob converted to regex: Glob { glob: "**/_*", re: "(?-u)^(?:/?|.*/)_[^/]*$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Literal('_'), ZeroOrMore]) }
|
||||
DEBUG: built glob set; 6 literals, 0 basenames, 0 extensions, 0 prefixes, 0 suffixes, 0 required extensions, 2 regexes
|
||||
DEBUG: Loading data from `[CWD]/_data`
|
||||
DEBUG: glob converted to regex: Glob { glob: "**/.*", re: "(?-u)^(?:/?|.*/)//.[^/]*$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Literal('.'), ZeroOrMore]) }
|
||||
DEBUG: glob converted to regex: Glob { glob: "**/_*", re: "(?-u)^(?:/?|.*/)_[^/]*$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Literal('_'), ZeroOrMore]) }
|
||||
DEBUG: built glob set; 0 literals, 0 basenames, 0 extensions, 0 prefixes, 0 suffixes, 0 required extensions, 2 regexes
|
||||
DEBUG: Loading snippets from `[CWD]/_includes`
|
||||
Build successful
|
||||
|
||||
```
|
|
@ -2,3 +2,5 @@ template_extensions:
|
|||
- txt
|
||||
- md
|
||||
- exe
|
||||
syntax_highlight:
|
||||
enabled: false
|
16
tests/cmd/custom_template_extensions.md
Normal file
16
tests/cmd/custom_template_extensions.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
```console
|
||||
$ cobalt -v build --destination _dest
|
||||
DEBUG: Using config file `[CWD]/_cobalt.yml`
|
||||
Building from `[CWD]` into `[CWD]/_dest`
|
||||
DEBUG: glob converted to regex: Glob { glob: "**/.*", re: "(?-u)^(?:/?|.*/)//.[^/]*$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Literal('.'), ZeroOrMore]) }
|
||||
DEBUG: glob converted to regex: Glob { glob: "**/_*", re: "(?-u)^(?:/?|.*/)_[^/]*$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Literal('_'), ZeroOrMore]) }
|
||||
DEBUG: built glob set; 6 literals, 0 basenames, 0 extensions, 0 prefixes, 0 suffixes, 0 required extensions, 2 regexes
|
||||
DEBUG: Loading data from `[CWD]/_data`
|
||||
DEBUG: glob converted to regex: Glob { glob: "**/.*", re: "(?-u)^(?:/?|.*/)//.[^/]*$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Literal('.'), ZeroOrMore]) }
|
||||
DEBUG: glob converted to regex: Glob { glob: "**/_*", re: "(?-u)^(?:/?|.*/)_[^/]*$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Literal('_'), ZeroOrMore]) }
|
||||
DEBUG: built glob set; 0 literals, 0 basenames, 0 extensions, 0 prefixes, 0 suffixes, 0 required extensions, 2 regexes
|
||||
DEBUG: Loading snippets from `[CWD]/_includes`
|
||||
WARN: Trailing separators are deprecated. We recommend frontmatters be surrounded, above and below, with ---
|
||||
Build successful
|
||||
|
||||
```
|
2
tests/cmd/data_files.in/_cobalt.yml
Normal file
2
tests/cmd/data_files.in/_cobalt.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
syntax_highlight:
|
||||
enabled: false
|
15
tests/cmd/data_files.md
Normal file
15
tests/cmd/data_files.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
```console
|
||||
$ cobalt -v build --destination _dest
|
||||
DEBUG: Using config file `[CWD]/_cobalt.yml`
|
||||
Building from `[CWD]` into `[CWD]/_dest`
|
||||
DEBUG: glob converted to regex: Glob { glob: "**/.*", re: "(?-u)^(?:/?|.*/)//.[^/]*$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Literal('.'), ZeroOrMore]) }
|
||||
DEBUG: glob converted to regex: Glob { glob: "**/_*", re: "(?-u)^(?:/?|.*/)_[^/]*$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Literal('_'), ZeroOrMore]) }
|
||||
DEBUG: built glob set; 6 literals, 0 basenames, 0 extensions, 0 prefixes, 0 suffixes, 0 required extensions, 2 regexes
|
||||
DEBUG: Loading data from `[CWD]/_data`
|
||||
DEBUG: glob converted to regex: Glob { glob: "**/.*", re: "(?-u)^(?:/?|.*/)//.[^/]*$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Literal('.'), ZeroOrMore]) }
|
||||
DEBUG: glob converted to regex: Glob { glob: "**/_*", re: "(?-u)^(?:/?|.*/)_[^/]*$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Literal('_'), ZeroOrMore]) }
|
||||
DEBUG: built glob set; 0 literals, 0 basenames, 0 extensions, 0 prefixes, 0 suffixes, 0 required extensions, 2 regexes
|
||||
DEBUG: Loading snippets from `[CWD]/_includes`
|
||||
Build successful
|
||||
|
||||
```
|
2
tests/cmd/dotfiles.in/_cobalt.yml
Normal file
2
tests/cmd/dotfiles.in/_cobalt.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
syntax_highlight:
|
||||
enabled: false
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue