on master help sign in
Initial version of syntax regression tests
commit78a681f02782f627756eeabfecbdb50dbd2516b7 authorsharkdp <davidpeter@web.de> dateMon 3 Aug 2020, 12:47 (6 years ago) parent3a85fd7
9 files changed+734
tests/.gitattributes+1 tests/syntax-tests/create_highlighted_versions.py+58 tests/syntax-tests/highlighted/Rust/output.rs+161 tests/syntax-tests/highlighted/Rust/test.rs+161 tests/syntax-tests/highlighted/SSH Config/ssh_config+9 tests/syntax-tests/highlighted/TOML/Cargo.toml+87 tests/syntax-tests/source/Rust/output.rs+161 tests/syntax-tests/source/SSH Config/ssh_config+9 tests/syntax-tests/source/TOML/Cargo.toml+87
tests/.gitattributes+1
@@ -11,3 +11,4 @@ snapshots/* linguist-vendored
1111benchmarks/* linguist-vendored
1212benchmarks/test-src/* linguist-vendored
1313scripts/* linguist-vendored
14+syntax-tests/* linguist-vendored
tests/syntax-tests/create_highlighted_versions.pynew file+58
@@ -0,0 +1,58 @@
1+#!/usr/bin/env python
2+
3+import subprocess
4+import glob
5+import sys
6+import os.path as path
7+import os
8+
9+
10+BAT_OPTIONS = [
11+ "--no-config",
12+ "--style=plain",
13+ "--color=always",
14+ "--theme='1337'",
15+ "--italic-text=always",
16+]
17+
18+
19+def create_highlighted_versions():
20+ root = os.path.dirname(os.path.abspath(__file__))
21+
22+ for source in glob.glob(path.join(root, "source", "*", "*")):
23+ try:
24+ bat_output = subprocess.check_output(
25+ ["bat"] + BAT_OPTIONS + [source], stderr=subprocess.PIPE,
26+ )
27+
28+ source_dirname = path.basename(path.dirname(source))
29+ source_filename = path.basename(source)
30+
31+ output_dir = path.join(root, "highlighted", source_dirname)
32+ output_path = path.join(output_dir, source_filename)
33+
34+ os.makedirs(output_dir, exist_ok=True)
35+
36+ with open(output_path, "wb") as output_file:
37+ output_file.write(bat_output)
38+
39+ relative_path = path.relpath(output_path, root)
40+ print("Created '{}'".format(relative_path))
41+ except subprocess.CalledProcessError as err:
42+ print(
43+ "=== Error: Could not highlight source file '{}".format(source),
44+ file=sys.stderr,
45+ )
46+ print(
47+ "=== bat stdout:\n{}".format(err.stdout.decode("utf-8")),
48+ file=sys.stderr,
49+ )
50+ print(
51+ "=== bat stderr:\n{}".format(err.stderr.decode("utf-8")),
52+ file=sys.stderr,
53+ )
54+ sys.exit(1)
55+
56+
57+if __name__ == "__main__":
58+ create_highlighted_versions()
tests/syntax-tests/highlighted/Rust/output.rsnew file+161
@@ -0,0 +1,161 @@
1+use std::io::{self, Write};
2+#[cfg(feature = "paging")]
3+use std::process::Child;
4+
5+use crate::error::*;
6+#[cfg(feature = "paging")]
7+use crate::less::retrieve_less_version;
8+#[cfg(feature = "paging")]
9+use crate::paging::PagingMode;
10+
11+#[derive(Debug)]
12+pub enum OutputType {
13+ #[cfg(feature = "paging")]
14+ Pager(Child),
15+ Stdout(io::Stdout),
16+}
17+
18+impl OutputType {
19+ #[cfg(feature = "paging")]
20+ pub fn from_mode(mode: PagingMode, pager: Option<&str>) -> Result<Self> {
21+ use self::PagingMode::*;
22+ Ok(match mode {
23+ Always => OutputType::try_pager(false, pager)?,
24+ QuitIfOneScreen => OutputType::try_pager(true, pager)?,
25+ _ => OutputType::stdout(),
26+ })
27+ }
28+
29+ /// Try to launch the pager. Fall back to stdout in case of errors.
30+ #[cfg(feature = "paging")]
31+ fn try_pager(quit_if_one_screen: bool, pager_from_config: Option<&str>) -> Result<Self> {
32+ use std::env;
33+ use std::ffi::OsString;
34+ use std::path::PathBuf;
35+ use std::process::{Command, Stdio};
36+
37+ let mut replace_arguments_to_less = false;
38+
39+ let pager_from_env = match (env::var("BAT_PAGER"), env::var("PAGER")) {
40+ (Ok(bat_pager), _) => Some(bat_pager),
41+ (_, Ok(pager)) => {
42+ // less needs to be called with the '-R' option in order to properly interpret the
43+ // ANSI color sequences printed by bat. If someone has set PAGER="less -F", we
44+ // therefore need to overwrite the arguments and add '-R'.
45+ //
46+ // We only do this for PAGER (as it is not specific to 'bat'), not for BAT_PAGER
47+ // or bats '--pager' command line option.
48+ replace_arguments_to_less = true;
49+ Some(pager)
50+ }
51+ _ => None,
52+ };
53+
54+ let pager_from_config = pager_from_config.map(|p| p.to_string());
55+
56+ if pager_from_config.is_some() {
57+ replace_arguments_to_less = false;
58+ }
59+
60+ let pager = pager_from_config
61+ .or(pager_from_env)
62+ .unwrap_or_else(|| String::from("less"));
63+
64+ let pagerflags =
65+ shell_words::split(&pager).chain_err(|| "Could not parse pager command.")?;
66+
67+ match pagerflags.split_first() {
68+ Some((pager_name, args)) => {
69+ let mut pager_path = PathBuf::from(pager_name);
70+
71+ if pager_path.file_stem() == Some(&OsString::from("bat")) {
72+ pager_path = PathBuf::from("less");
73+ }
74+
75+ let is_less = pager_path.file_stem() == Some(&OsString::from("less"));
76+
77+ let mut process = if is_less {
78+ let mut p = Command::new(&pager_path);
79+ if args.is_empty() || replace_arguments_to_less {
80+ p.arg("--RAW-CONTROL-CHARS");
81+ if quit_if_one_screen {
82+ p.arg("--quit-if-one-screen");
83+ }
84+
85+ // Passing '--no-init' fixes a bug with '--quit-if-one-screen' in older
86+ // versions of 'less'. Unfortunately, it also breaks mouse-wheel support.
87+ //
88+ // See: http://www.greenwoodsoftware.com/less/news.530.html
89+ //
90+ // For newer versions (530 or 558 on Windows), we omit '--no-init' as it
91+ // is not needed anymore.
92+ match retrieve_less_version() {
93+ None => {
94+ p.arg("--no-init");
95+ }
96+ Some(version)
97+ if (version < 530 || (cfg!(windows) && version < 558)) =>
98+ {
99+ p.arg("--no-init");
100+ }
101+ _ => {}
102+ }
103+ } else {
104+ p.args(args);
105+ }
106+ p.env("LESSCHARSET", "UTF-8");
107+ p
108+ } else {
109+ let mut p = Command::new(&pager_path);
110+ p.args(args);
111+ p
112+ };
113+
114+ Ok(process
115+ .stdin(Stdio::piped())
116+ .spawn()
117+ .map(OutputType::Pager)
118+ .unwrap_or_else(|_| OutputType::stdout()))
119+ }
120+ None => Ok(OutputType::stdout()),
121+ }
122+ }
123+
124+ pub(crate) fn stdout() -> Self {
125+ OutputType::Stdout(io::stdout())
126+ }
127+
128+ #[cfg(feature = "paging")]
129+ pub(crate) fn is_pager(&self) -> bool {
130+ if let OutputType::Pager(_) = self {
131+ true
132+ } else {
133+ false
134+ }
135+ }
136+
137+ #[cfg(not(feature = "paging"))]
138+ pub(crate) fn is_pager(&self) -> bool {
139+ false
140+ }
141+
142+ pub fn handle(&mut self) -> Result<&mut dyn Write> {
143+ Ok(match *self {
144+ #[cfg(feature = "paging")]
145+ OutputType::Pager(ref mut command) => command
146+ .stdin
147+ .as_mut()
148+ .chain_err(|| "Could not open stdin for pager")?,
149+ OutputType::Stdout(ref mut handle) => handle,
150+ })
151+ }
152+}
153+
154+#[cfg(feature = "paging")]
155+impl Drop for OutputType {
156+ fn drop(&mut self) {
157+ if let OutputType::Pager(ref mut command) = *self {
158+ let _ = command.wait();
159+ }
160+ }
161+}
tests/syntax-tests/highlighted/Rust/test.rsnew file+161
@@ -0,0 +1,161 @@
1+use std::io::{self, Write};
2+#[cfg(feature = "paging")]
3+use std::process::Child;
4+
5+use crate::error::*;
6+#[cfg(feature = "paging")]
7+use crate::less::retrieve_less_version;
8+#[cfg(feature = "paging")]
9+use crate::paging::PagingMode;
10+
11+#[derive(Debug)]
12+pub enum OutputType {
13+ #[cfg(feature = "paging")]
14+ Pager(Child),
15+ Stdout(io::Stdout),
16+}
17+
18+impl OutputType {
19+ #[cfg(feature = "paging")]
20+ pub fn from_mode(mode: PagingMode, pager: Option<&str>) -> Result<Self> {
21+ use self::PagingMode::*;
22+ Ok(match mode {
23+ Always => OutputType::try_pager(false, pager)?,
24+ QuitIfOneScreen => OutputType::try_pager(true, pager)?,
25+ _ => OutputType::stdout(),
26+ })
27+ }
28+
29+ /// Try to launch the pager. Fall back to stdout in case of errors.
30+ #[cfg(feature = "paging")]
31+ fn try_pager(quit_if_one_screen: bool, pager_from_config: Option<&str>) -> Result<Self> {
32+ use std::env;
33+ use std::ffi::OsString;
34+ use std::path::PathBuf;
35+ use std::process::{Command, Stdio};
36+
37+ let mut replace_arguments_to_less = false;
38+
39+ let pager_from_env = match (env::var("BAT_PAGER"), env::var("PAGER")) {
40+ (Ok(bat_pager), _) => Some(bat_pager),
41+ (_, Ok(pager)) => {
42+ // less needs to be called with the '-R' option in order to properly interpret the
43+ // ANSI color sequences printed by bat. If someone has set PAGER="less -F", we
44+ // therefore need to overwrite the arguments and add '-R'.
45+ //
46+ // We only do this for PAGER (as it is not specific to 'bat'), not for BAT_PAGER
47+ // or bats '--pager' command line option.
48+ replace_arguments_to_less = true;
49+ Some(pager)
50+ }
51+ _ => None,
52+ };
53+
54+ let pager_from_config = pager_from_config.map(|p| p.to_string());
55+
56+ if pager_from_config.is_some() {
57+ replace_arguments_to_less = false;
58+ }
59+
60+ let pager = pager_from_config
61+ .or(pager_from_env)
62+ .unwrap_or_else(|| String::from("less"));
63+
64+ let pagerflags =
65+ shell_words::split(&pager).chain_err(|| "Could not parse pager command.")?;
66+
67+ match pagerflags.split_first() {
68+ Some((pager_name, args)) => {
69+ let mut pager_path = PathBuf::from(pager_name);
70+
71+ if pager_path.file_stem() == Some(&OsString::from("bat")) {
72+ pager_path = PathBuf::from("less");
73+ }
74+
75+ let is_less = pager_path.file_stem() == Some(&OsString::from("less"));
76+
77+ let mut process = if is_less {
78+ let mut p = Command::new(&pager_path);
79+ if args.is_empty() || replace_arguments_to_less {
80+ p.arg("--RAW-CONTROL-CHARS");
81+ if quit_if_one_screen {
82+ p.arg("--quit-if-one-screen");
83+ }
84+
85+ // Passing '--no-init' fixes a bug with '--quit-if-one-screen' in older
86+ // versions of 'less'. Unfortunately, it also breaks mouse-wheel support.
87+ //
88+ // See: http://www.greenwoodsoftware.com/less/news.530.html
89+ //
90+ // For newer versions (530 or 558 on Windows), we omit '--no-init' as it
91+ // is not needed anymore.
92+ match retrieve_less_version() {
93+ None => {
94+ p.arg("--no-init");
95+ }
96+ Some(version)
97+ if (version < 530 || (cfg!(windows) && version < 558)) =>
98+ {
99+ p.arg("--no-init");
100+ }
101+ _ => {}
102+ }
103+ } else {
104+ p.args(args);
105+ }
106+ p.env("LESSCHARSET", "UTF-8");
107+ p
108+ } else {
109+ let mut p = Command::new(&pager_path);
110+ p.args(args);
111+ p
112+ };
113+
114+ Ok(process
115+ .stdin(Stdio::piped())
116+ .spawn()
117+ .map(OutputType::Pager)
118+ .unwrap_or_else(|_| OutputType::stdout()))
119+ }
120+ None => Ok(OutputType::stdout()),
121+ }
122+ }
123+
124+ pub(crate) fn stdout() -> Self {
125+ OutputType::Stdout(io::stdout())
126+ }
127+
128+ #[cfg(feature = "paging")]
129+ pub(crate) fn is_pager(&self) -> bool {
130+ if let OutputType::Pager(_) = self {
131+ true
132+ } else {
133+ false
134+ }
135+ }
136+
137+ #[cfg(not(feature = "paging"))]
138+ pub(crate) fn is_pager(&self) -> bool {
139+ false
140+ }
141+
142+ pub fn handle(&mut self) -> Result<&mut dyn Write> {
143+ Ok(match *self {
144+ #[cfg(feature = "paging")]
145+ OutputType::Pager(ref mut command) => command
146+ .stdin
147+ .as_mut()
148+ .chain_err(|| "Could not open stdin for pager")?,
149+ OutputType::Stdout(ref mut handle) => handle,
150+ })
151+ }
152+}
153+
154+#[cfg(feature = "paging")]
155+impl Drop for OutputType {
156+ fn drop(&mut self) {
157+ if let OutputType::Pager(ref mut command) = *self {
158+ let _ = command.wait();
159+ }
160+ }
161+}
tests/syntax-tests/highlighted/SSH Config/ssh_confignew file+9
@@ -0,0 +1,9 @@
1+# A comment
2+
3+Host example.com
4+ User dummy
5+ Compression no
6+
7+Host *.co.uk
8+ BatchMode no
9+ GlobalKnownHostsFile "/etc/ssh/ssh_known_hosts"
tests/syntax-tests/highlighted/TOML/Cargo.tomlnew file+87
@@ -0,0 +1,87 @@
1+[package]
2+authors = ["David Peter <mail@david-peter.de>"]
3+categories = ["command-line-utilities"]
4+description="A cat(1) clone with wings."
5+homepage = "https://github.com/sharkdp/bat"
6+license = "MIT/Apache-2.0"
7+name = "bat"
8+readme = "README.md"
9+repository = "https://github.com/sharkdp/bat"
10+version = "0.15.4"
11+exclude = [
12+ "assets/syntaxes/*",
13+ "assets/themes/*",
14+]
15+build = "build.rs"
16+edition = '2018'
17+
18+[features]
19+default = ["application"]
20+# Feature required for bat the application. Should be disabled when depending on
21+# bat as a library.
22+application = [
23+ "atty",
24+ "clap",
25+ "dirs",
26+ "git",
27+ "lazy_static",
28+ "liquid",
29+ "paging",
30+ "wild",
31+ "regex-onig",
32+]
33+git = ["git2"] # Support indicating git modifications
34+paging = ["shell-words"] # Support applying a pager on the output
35+regex-onig = ["syntect/regex-onig"] # Use the "oniguruma" regex engine
36+regex-fancy = ["syntect/regex-fancy"] # Use the rust-only "fancy-regex" engine
37+
38+[dependencies]
39+atty = { version = "0.2.14", optional = true }
40+ansi_term = "^0.12.1"
41+ansi_colours = "^1.0"
42+console = "0.11.3"
43+dirs = { version = "3.0", optional = true }
44+lazy_static = { version = "1.4", optional = true }
45+wild = { version = "2.0", optional = true }
46+content_inspector = "0.2.4"
47+encoding = "0.2"
48+shell-words = { version = "1.0.0", optional = true }
49+unicode-width = "0.1.8"
50+globset = "0.4"
51+serde = { version = "1.0", features = ["derive"] }
52+serde_yaml = "0.8"
53+semver = "0.10"
54+path_abs = { version = "0.5", default-features = false }
55+
56+[dependencies.git2]
57+version = "0.13"
58+optional = true
59+default-features = false
60+
61+[dependencies.syntect]
62+version = "4.2.0"
63+default-features = false
64+features = ["parsing", "yaml-load", "dump-load", "dump-create"]
65+
66+[dependencies.clap]
67+version = "2.33"
68+optional = true
69+default-features = false
70+features = ["suggestions", "color", "wrap_help"]
71+
72+[dependencies.error-chain]
73+version = "0.12"
74+default-features = false
75+
76+[dev-dependencies]
77+tempdir = "0.3"
78+assert_cmd = "1.0.1"
79+predicates = "1.0.5"
80+
81+[build-dependencies]
82+clap = { version = "2.33", optional = true }
83+liquid = { version = "0.21", optional = true }
84+
85+[profile.release]
86+lto = true
87+codegen-units = 1
tests/syntax-tests/source/Rust/output.rsnew file+161
@@ -0,0 +1,161 @@
1+use std::io::{self, Write};
2+#[cfg(feature = "paging")]
3+use std::process::Child;
4+
5+use crate::error::*;
6+#[cfg(feature = "paging")]
7+use crate::less::retrieve_less_version;
8+#[cfg(feature = "paging")]
9+use crate::paging::PagingMode;
10+
11+#[derive(Debug)]
12+pub enum OutputType {
13+ #[cfg(feature = "paging")]
14+ Pager(Child),
15+ Stdout(io::Stdout),
16+}
17+
18+impl OutputType {
19+ #[cfg(feature = "paging")]
20+ pub fn from_mode(mode: PagingMode, pager: Option<&str>) -> Result<Self> {
21+ use self::PagingMode::*;
22+ Ok(match mode {
23+ Always => OutputType::try_pager(false, pager)?,
24+ QuitIfOneScreen => OutputType::try_pager(true, pager)?,
25+ _ => OutputType::stdout(),
26+ })
27+ }
28+
29+ /// Try to launch the pager. Fall back to stdout in case of errors.
30+ #[cfg(feature = "paging")]
31+ fn try_pager(quit_if_one_screen: bool, pager_from_config: Option<&str>) -> Result<Self> {
32+ use std::env;
33+ use std::ffi::OsString;
34+ use std::path::PathBuf;
35+ use std::process::{Command, Stdio};
36+
37+ let mut replace_arguments_to_less = false;
38+
39+ let pager_from_env = match (env::var("BAT_PAGER"), env::var("PAGER")) {
40+ (Ok(bat_pager), _) => Some(bat_pager),
41+ (_, Ok(pager)) => {
42+ // less needs to be called with the '-R' option in order to properly interpret the
43+ // ANSI color sequences printed by bat. If someone has set PAGER="less -F", we
44+ // therefore need to overwrite the arguments and add '-R'.
45+ //
46+ // We only do this for PAGER (as it is not specific to 'bat'), not for BAT_PAGER
47+ // or bats '--pager' command line option.
48+ replace_arguments_to_less = true;
49+ Some(pager)
50+ }
51+ _ => None,
52+ };
53+
54+ let pager_from_config = pager_from_config.map(|p| p.to_string());
55+
56+ if pager_from_config.is_some() {
57+ replace_arguments_to_less = false;
58+ }
59+
60+ let pager = pager_from_config
61+ .or(pager_from_env)
62+ .unwrap_or_else(|| String::from("less"));
63+
64+ let pagerflags =
65+ shell_words::split(&pager).chain_err(|| "Could not parse pager command.")?;
66+
67+ match pagerflags.split_first() {
68+ Some((pager_name, args)) => {
69+ let mut pager_path = PathBuf::from(pager_name);
70+
71+ if pager_path.file_stem() == Some(&OsString::from("bat")) {
72+ pager_path = PathBuf::from("less");
73+ }
74+
75+ let is_less = pager_path.file_stem() == Some(&OsString::from("less"));
76+
77+ let mut process = if is_less {
78+ let mut p = Command::new(&pager_path);
79+ if args.is_empty() || replace_arguments_to_less {
80+ p.arg("--RAW-CONTROL-CHARS");
81+ if quit_if_one_screen {
82+ p.arg("--quit-if-one-screen");
83+ }
84+
85+ // Passing '--no-init' fixes a bug with '--quit-if-one-screen' in older
86+ // versions of 'less'. Unfortunately, it also breaks mouse-wheel support.
87+ //
88+ // See: http://www.greenwoodsoftware.com/less/news.530.html
89+ //
90+ // For newer versions (530 or 558 on Windows), we omit '--no-init' as it
91+ // is not needed anymore.
92+ match retrieve_less_version() {
93+ None => {
94+ p.arg("--no-init");
95+ }
96+ Some(version)
97+ if (version < 530 || (cfg!(windows) && version < 558)) =>
98+ {
99+ p.arg("--no-init");
100+ }
101+ _ => {}
102+ }
103+ } else {
104+ p.args(args);
105+ }
106+ p.env("LESSCHARSET", "UTF-8");
107+ p
108+ } else {
109+ let mut p = Command::new(&pager_path);
110+ p.args(args);
111+ p
112+ };
113+
114+ Ok(process
115+ .stdin(Stdio::piped())
116+ .spawn()
117+ .map(OutputType::Pager)
118+ .unwrap_or_else(|_| OutputType::stdout()))
119+ }
120+ None => Ok(OutputType::stdout()),
121+ }
122+ }
123+
124+ pub(crate) fn stdout() -> Self {
125+ OutputType::Stdout(io::stdout())
126+ }
127+
128+ #[cfg(feature = "paging")]
129+ pub(crate) fn is_pager(&self) -> bool {
130+ if let OutputType::Pager(_) = self {
131+ true
132+ } else {
133+ false
134+ }
135+ }
136+
137+ #[cfg(not(feature = "paging"))]
138+ pub(crate) fn is_pager(&self) -> bool {
139+ false
140+ }
141+
142+ pub fn handle(&mut self) -> Result<&mut dyn Write> {
143+ Ok(match *self {
144+ #[cfg(feature = "paging")]
145+ OutputType::Pager(ref mut command) => command
146+ .stdin
147+ .as_mut()
148+ .chain_err(|| "Could not open stdin for pager")?,
149+ OutputType::Stdout(ref mut handle) => handle,
150+ })
151+ }
152+}
153+
154+#[cfg(feature = "paging")]
155+impl Drop for OutputType {
156+ fn drop(&mut self) {
157+ if let OutputType::Pager(ref mut command) = *self {
158+ let _ = command.wait();
159+ }
160+ }
161+}
tests/syntax-tests/source/SSH Config/ssh_confignew file+9
@@ -0,0 +1,9 @@
1+# A comment
2+
3+Host example.com
4+ User dummy
5+ Compression no
6+
7+Host *.co.uk
8+ BatchMode no
9+ GlobalKnownHostsFile "/etc/ssh/ssh_known_hosts"
tests/syntax-tests/source/TOML/Cargo.tomlnew file+87
@@ -0,0 +1,87 @@
1+[package]
2+authors = ["David Peter <mail@david-peter.de>"]
3+categories = ["command-line-utilities"]
4+description="A cat(1) clone with wings."
5+homepage = "https://github.com/sharkdp/bat"
6+license = "MIT/Apache-2.0"
7+name = "bat"
8+readme = "README.md"
9+repository = "https://github.com/sharkdp/bat"
10+version = "0.15.4"
11+exclude = [
12+ "assets/syntaxes/*",
13+ "assets/themes/*",
14+]
15+build = "build.rs"
16+edition = '2018'
17+
18+[features]
19+default = ["application"]
20+# Feature required for bat the application. Should be disabled when depending on
21+# bat as a library.
22+application = [
23+ "atty",
24+ "clap",
25+ "dirs",
26+ "git",
27+ "lazy_static",
28+ "liquid",
29+ "paging",
30+ "wild",
31+ "regex-onig",
32+]
33+git = ["git2"] # Support indicating git modifications
34+paging = ["shell-words"] # Support applying a pager on the output
35+regex-onig = ["syntect/regex-onig"] # Use the "oniguruma" regex engine
36+regex-fancy = ["syntect/regex-fancy"] # Use the rust-only "fancy-regex" engine
37+
38+[dependencies]
39+atty = { version = "0.2.14", optional = true }
40+ansi_term = "^0.12.1"
41+ansi_colours = "^1.0"
42+console = "0.11.3"
43+dirs = { version = "3.0", optional = true }
44+lazy_static = { version = "1.4", optional = true }
45+wild = { version = "2.0", optional = true }
46+content_inspector = "0.2.4"
47+encoding = "0.2"
48+shell-words = { version = "1.0.0", optional = true }
49+unicode-width = "0.1.8"
50+globset = "0.4"
51+serde = { version = "1.0", features = ["derive"] }
52+serde_yaml = "0.8"
53+semver = "0.10"
54+path_abs = { version = "0.5", default-features = false }
55+
56+[dependencies.git2]
57+version = "0.13"
58+optional = true
59+default-features = false
60+
61+[dependencies.syntect]
62+version = "4.2.0"
63+default-features = false
64+features = ["parsing", "yaml-load", "dump-load", "dump-create"]
65+
66+[dependencies.clap]
67+version = "2.33"
68+optional = true
69+default-features = false
70+features = ["suggestions", "color", "wrap_help"]
71+
72+[dependencies.error-chain]
73+version = "0.12"
74+default-features = false
75+
76+[dev-dependencies]
77+tempdir = "0.3"
78+assert_cmd = "1.0.1"
79+predicates = "1.0.5"
80+
81+[build-dependencies]
82+clap = { version = "2.33", optional = true }
83+liquid = { version = "0.21", optional = true }
84+
85+[profile.release]
86+lto = true
87+codegen-units = 1