summaryrefslogtreecommitdiffstats
path: root/Cargo.toml
diff options
context:
space:
mode:
authorJoe Wilm <joe@jwilm.com>2016-11-19 16:16:20 -0800
committerJoe Wilm <joe@jwilm.com>2016-11-19 21:34:11 -0800
commit66dbd29cd194a4c84f796f32827429895c2a3bba (patch)
tree5f5322cdae53d4fc295fe85f519192e9d38aab03 /Cargo.toml
parentd97996e19de6856c23c51d05ec10f10db41e309d (diff)
Add support for recording/running ref tests
Ref tests use a recording of the terminal protocol and a serialization of the grid state to check that the parsing and action handling systems produce the correct result. Ref tests may be recorded by running alacritty with `--ref-test` and closing the terminal by using the window "X" button. At that point, the recording is fully written to disk, and a serialization of important state is recorded. Those files should be moved to an appropriate folder in the `tests/ref/` tree, and the `ref_test!` macro invocation should be updated accordingly. A couple of changes were necessary to make this work: * Ref tests shouldn't create a pty; the pty was refactored out of the `Term` type. * Repeatable lines/cols were needed; on startup, the terminal is resized * by default to 80x24 though that may be changed by passing `--dimensions w h`. * Calculating window size based on desired rows/columns and font metrics required making load_font callable multiple times. * Refactor types into library crate so they may be imported in an integration test. * A whole bunch of types needed symmetric serialization and deserialization. Mostly this was just adding derives, but the custom deserialization of Rgb had to change to a deserialize_with function. This initially adds one ref test as a sanity check, and more will be added in subsequent commits. This initial ref tests just starts the terminal and runs `ll`.
Diffstat (limited to 'Cargo.toml')
-rw-r--r--Cargo.toml7
1 files changed, 7 insertions, 0 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 9da6e7ca..c17c585f 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -5,6 +5,11 @@ authors = ["Joe Wilm <joe@jwilm.com>"]
license = "Apache-2.0"
build = "build.rs"
+[[bin]]
+doc = false
+path = "src/main.rs"
+name = "alacritty"
+
[dependencies]
libc = "*"
cgmath = "0.7"
@@ -18,6 +23,7 @@ serde_yaml = "0.5"
serde_derive = "0.8"
vte = "0.1.2"
mio = "0.6"
+serde_json = "*"
copypasta = { path = "./copypasta" }
[features]
@@ -32,5 +38,6 @@ gl_generator = "0.5"
git = "https://github.com/jwilm/glutin"
rev = "78838c1e1497dc8a1b1c8f69da7a6f3cd7da15c1"
+
[profile.release]
debug = true