summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJoe Wilm <joe@jwilm.com>2016-11-28 14:13:11 -0800
committerJoe Wilm <joe@jwilm.com>2016-12-11 20:23:41 -0800
commit30bee80a6902eb09c51bed9c9f54c7617c4d53db (patch)
tree187853fdf17d3382595be8a416e604c6f2bea0f0 /tests
parent941818d88ebc1f0d90ef9b1ef7d1313174afb36b (diff)
Refactor cell selection out of renderer
The terminal now has a `renderable_cells()` function that returns a `RenderableCellIter` iterator. This allows reuse of the cell selection code by multiple renderers, makes it testable, and makes it independently optimizable. The render API now takes an `Iterator<Item=IndexedCell>` to support both the new renderable cells iterator and the `render_string()` method which generates its own iterator. The `vim_large_window_scoll` ref test was added here because it provides a nice large and busy grid to benchmark the cell selection with.
Diffstat (limited to 'tests')
-rw-r--r--tests/ref.rs3
-rw-r--r--tests/ref/vim_large_window_scroll/alacritty.recording295
-rw-r--r--tests/ref/vim_large_window_scroll/grid.json1
-rw-r--r--tests/ref/vim_large_window_scroll/size.json1
4 files changed, 299 insertions, 1 deletions
diff --git a/tests/ref.rs b/tests/ref.rs
index 349b565e..a92da05f 100644
--- a/tests/ref.rs
+++ b/tests/ref.rs
@@ -78,6 +78,7 @@ mod reference {
ll,
vim_simple_edit,
tmux_htop,
- tmux_git_log
+ tmux_git_log,
+ vim_large_window_scroll
}
}
diff --git a/tests/ref/vim_large_window_scroll/alacritty.recording b/tests/ref/vim_large_window_scroll/alacritty.recording
new file mode 100644
index 00000000..a0569538
--- /dev/null
+++ b/tests/ref/vim_large_window_scroll/alacritty.recording
@@ -0,0 +1,295 @@
+% jwilm@kurast.local ➜  ~/code/alacritty  [?1h=[?2004hvvivim[?1l>[?2004l
+[?1049h[?1h=▽ [?12;25h[?12l[?25h[>c[?25l 1  
+~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 0,0-1AllVIM - Vi IMprovedversion 7.4.1832by Bram Moolenaar et al.Vim is open source and freely distributableHelp poor children in Uganda!type :help iccf<Enter> for information type :q<Enter> to exit type :help<Enter> or <F1> for on-line helptype :help version7<Enter> for version info[?12l[?25h[?25l:CommandT          [No Name] [Git(mouse-reporting)] 0,0-1 AllCommand-T [Files] [-][Git(mouse-reporting)] 0,0-1 All>>  [No Name] [Git(mouse-reporting)] 0,0-1 All copypasta/Cargo.lock build.rs alacritty.yml alacritty.recording alacritty-pre-eloop TASKS.md README.md Makefile LICENSE-APACHE Cargo.toml Cargo.lock Alacritty.app/Contents/Resources/Alacritty.icns Alacritty.app/Contents/PkgInfo Alacritty.app/Contents/MacOS/Alacritty> Alacritty.app/Contents/Info.plist 15,1  [?12l[?25h[?25ll font/src/ft/list_fonts.rs
+ copypasta/LICENSE-APACHE
+ tests/ref/ll/size.json
+ tests/ref/ll/grid.json
+ copypasta/src/lib.rs
+ font/src/lib.rs
+ src/lib.rs
+ Alacritty.app/Contents/Resources/Alacritty.icns
+ Alacritty.app/Contents/MacOS/Alacritty
+ Alacritty.app/Contents/Info.plist
+ Alacritty.app/Contents/PkgInfo
+ alrecordingal-pre-eloopLICENSE-APACHEayml l [?12l[?25h[?25lli tests/ref/tmux_git_log/grid.json
+ tests/ref/tmux_git_log/size.json
+ Alacritty.app/Contents/Info.plist
+ macos/Info.plisttmux-client-23038.log
+ alacritty.recording
+ alacritty-pre-eloop
+ aitty.ymliPkgInfofont/src/ft/list_fonts.rscopypasta/LICENSE-APACHEcopypasta/src/lib.rs
+ font/src/lib.rssrc/lib.rsLICENSE-APACHEli [?12l[?25h[?25llib ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [No Name] [Git(mouse-reporting)] 0,0-1 Allcopypasta/src/lib.rs
+ font/src/lib.rssrc/lib.rs 3,1 lib [?12l[?25h[?25l~ ~ [No Name] [Git(mouse-reporting)] 0,0-1 All 1   [No Name] [Git(mouse-reporting)] 0,0-1 1  
+~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 0,0-1All0,0-1All Error detected while processing function commandt#private#AcceptSelection:
+line 1:
+E325: ATTENTION
+Found a swap file by the name "~/.vim/swap//%Users%jwilm%code%alacritty%src%lib.rs.swp"
+owned by: jwilm dated: Fri Nov 25 22:16:29 2016
+file name: ~jwilm/code/alacritty/src/lib.rs
+modified: no
+user name: jwilm host name: kurast.local
+process ID: 2530 (still running)
+While opening file "src/lib.rs"
+dated: Fri Nov 25 22:16:02 2016
+
+(1) Another program may be editing the same file. If this is the case,
+ be careful not to end up with two different instances of the same
+ file when making changes. Quit, or continue with caution.
+(2) An edit session for this file crashed.
+ If this is the case, use ":recover" or "vim -r src/lib.rs"
+ to recover the changes (see ":help recovery").
+ If you did this already, delete the swap file "/Users/jwilm/.vim/swap//%Users%jwilm%code%alacritty%src%lib.rs.swp"
+ to avoid this message.
+
+Swap file "~/.vim/swap//%Users%jwilm%code%alacritty%src%lib.rs.swp" already exists!
+[O]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (A)bort: [?12l[?25h[?25l"src/lib.rs" [readonly] 99L, 2333C 1// Copyright 2016 Joe Wilm, The Alacritty Project Contributors   2//   3// Licensed under the Apache License, Version 2.0 (the "License");   4// you may not use this file except in compliance with the License.   5// You may obtain a copy of the License at   6//   7// http://www.apache.org/licenses/LICENSE-2.0   8//   9// Unless required by applicable law or agreed to in writing, software   10// distributed under the License is distributed on an "AS IS" BASIS,   11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   12// See the License for the specific language governing permissions and   13// limitations under the License.   14//   15//! Alacritty - The GPU Enhanced Terminal   16#![feature(question_mark)]   17#![feature(range_contains)]   18#![feature(inclusive_range_syntax)]   19#![feature(drop_types_in_const)]   20#![feature(unicode)]   21#![feature(step_trait)]   22#![cfg_attr(test, feature(test))]   23#![feature(core_intrinsics)]   24#![allow(stable_features)] // lying about question_mark because 1.14.0 isn't released!   25   26#![feature(proc_macro)]   27   28#[macro_use]   29extern crate serde_derive;   30   31extern crate cgmath;   32extern crate copypasta;   33extern crate errno;   34extern crate font;   35 extern crate glutin;  
+ 36 extern crate libc; 
+ 37 extern crate mio; 
+ 38 extern crate notify;  
+ 39 extern crate parking_lot;  
+ 40 extern crate serde;  
+ 41 extern crate serde_json; 
+ 42 extern crate serde_yaml;  
+ 43 extern crate vte;  
+ 44   
+ 45 #[macro_use]  
+ 46 extern crate bitflags; 
+ 47   
+ 48 #[macro_use]  
+ 49 pub mod macros;  
+ 50   
+ 51 pub mod event;  
+ 52 pub mod event_loop;  
+ 53 pub mod index;   54 pub mod input;  
+ 55 pub mod meter; 
+ 56 pub mod renderer;  1,1Top[?12l[?25h[?25l:CommandT "[Scratch]" --No lines in buffer--
+"Command-T [Files]" --No lines in buffer-- 1 // Copyright 2016 Joe Wilm, The Alacritty Project Contributors serdeserdeserdeserdesrc/lib.rs [RO][Git(mouse-reporting)] 1,1 TopCommand-T [Files] [-][Git(mouse-reporting)] 0,0-1