1{-# LANGUAGE OverloadedStrings #-}
2import Network.Wai.Handler.Launch (insideHead)
5import Data.Enumerator hiding (map)
7import qualified Data.ByteString as S
10main = hspec $ describe "insideHead"
11 [ it "handles single chunks" $ helper "bar<head>foobaz" ["bar<head>baz"]
12 , it "handles single chunks, no <head>" $ helper "barfoo" ["bar"]
13 , it "handles whole chunks" $ helper "bar<head>foobaz" ["bar", "<head>", "baz"]
14 , it "handles split chunks" $ helper "bar<head>foobaz" ["bar", "<he", "ad>", "baz"]
15 , it "handles many chunks" $ helper "bar<head>foobaz1234567890" ["bar", "<he", "ad>", "baz", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0"]
16 , it "handles many pieces" $ helper "bar<head>foobaz" $ map S.singleton $ S.unpack "bar<head>baz"
19helper :: S.ByteString -> [S.ByteString] -> Assertion
21 x <- run_ $ enumList 1 pieces $$ joinI $ insideHead "foo" $$ consume
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list