Skip to content

Commit

Permalink
revert cram test to follow main
Browse files Browse the repository at this point in the history
  • Loading branch information
yokurang committed Aug 16, 2024
1 parent 758019a commit 97bda80
Showing 1 changed file with 62 additions and 62 deletions.
124 changes: 62 additions & 62 deletions test/cram/test.t
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,28 @@ This is a cram test for the new executable.



[h]elp [q]uit [n/p]avigate [t]oggle view [r]ender mode
Type 'h' to go to the help panel, 'q' to quit, 'n' to go to the next operation, 'p' to go to the previous operation. Press 't' to toggle view mode.
$ dummy_terminal example.diff n
Operation 2 of 14, 1 hunk
3 additions, 1 removal
Modification of bin/main.ml
@@ -1,7 +1,9 @@
1 1 open Diffcessible
2 2
3 3 let main () =
4 - Interactive_viewer.start ()
4 + let s = In_channel.input_all In_channel.stdin in let patch = Patch.to_diffs s in Interactive_viewer.start patch
5 5
6 6 open Cmdliner
7 7
1 1 open Diffcessible
2 2
3 3 let main () =
4 - Interactive_viewer.start ()
4 + let s = In_channel.input_all In_channel.stdin in
5 + let patch = Patch.to_diffs s in
6 + Interactive_viewer.start patch
5 7
6 8 open Cmdliner
7 9







[h]elp [q]uit [n/p]avigate [t]oggle view [r]ender mode
Type 'h' to go to the help panel, 'q' to quit, 'n' to go to the next operation, 'p' to go to the previous operation. Press 't' to toggle view mode.
$ dummy_terminal example.diff n n
Operation 3 of 14, 1 hunk
1 addition, 1 removal
Expand All @@ -63,7 +63,7 @@ This is a cram test for the new executable.



[h]elp [q]uit [n/p]avigate [t]oggle view [r]ender mode
Type 'h' to go to the help panel, 'q' to quit, 'n' to go to the next operation, 'p' to go to the previous operation. Press 't' to toggle view mode.
$ dummy_terminal example.diff h
Help Panel:

Expand All @@ -90,8 +90,9 @@ This is a cram test for the new executable.
2 additions, 1 removal
Modification of file.txt
@@ -2,1 +2,2 @@
1 - Hi everyone!
1 + Hello World! This is the diffcessible project.
2 - Hi everyone!
2 + Hello World!
3 + This is the diffcessible project.



Expand All @@ -104,16 +105,15 @@ This is a cram test for the new executable.




[h]elp [q]uit [n/p]avigate [t]oggle view [r]ender mode
Type 'h' to go to the help panel, 'q' to quit, 'n' to go to the next operation, 'p' to go to the previous operation. Press 't' to toggle view mode.
$ dummy_terminal more-examples.diff n
Operation 2 of 2, 1 hunk
2 additions, 1 removal
Modification of file.txt
@@ -3,1 +5,2 @@
1 - This file starts at line 3.
1 + This file starts at line 5. This is the second test case in this file.

3 - This file starts at line 3.
5 + This file starts at line 5.
6 + This is the second test case in this file.



Expand All @@ -126,7 +126,7 @@ This is a cram test for the new executable.



[h]elp [q]uit [n/p]avigate [t]oggle view [r]ender mode
Type 'h' to go to the help panel, 'q' to quit, 'n' to go to the next operation, 'p' to go to the previous operation. Press 't' to toggle view mode.



Expand All @@ -139,8 +139,8 @@ This is a cram test for the new executable.
2 additions, 1 removal
Modification of file.txt
@@ -2,1 @@ @@ +2,2 @@
1 Hi everyone! 1 Hello World!
2 This is the diffcessible project.
1 - Hi everyone! 1 + Hello World!
2 + This is the diffcessible project.



Expand All @@ -154,15 +154,15 @@ This is a cram test for the new executable.



[h]elp [q]uit [n/p]avigate [t]oggle view [r]ender mode
Type 'h' to go to the help panel, 'q' to quit, 'n' to go to the next operation, 'p' to go to the previous operation. Press 't' to toggle view mode.

$ dummy_terminal more-examples.diff n t
Operation 2 of 2, 1 hunk
2 additions, 1 removal
Modification of file.txt
@@ -3,1 @@ @@ +5,2 @@
1 This file starts at line 3. 1 This file starts at line 5.
2 This is the second test case in this file.
1 - This file starts at line 3. 1 + This file starts at line 5.
2 + This is the second test case in this file.



Expand All @@ -176,7 +176,7 @@ This is a cram test for the new executable.



[h]elp [q]uit [n/p]avigate [t]oggle view [r]ender mode
Type 'h' to go to the help panel, 'q' to quit, 'n' to go to the next operation, 'p' to go to the previous operation. Press 't' to toggle view mode.

$ dummy_terminal example.diff n n t
Operation 3 of 14, 1 hunk
Expand All @@ -185,7 +185,7 @@ This is a cram test for the new executable.
@@ -1,3 @@ @@ +1,3 @@
1 (library 1 (library
2 (name diffcessible) 2 (name diffcessible)
3 (libraries notty nottui lwd)) 3 (libraries notty nottui lwd patch))
3 - (libraries notty nottui lwd)) 3 + (libraries notty nottui lwd patch))



Expand All @@ -198,7 +198,7 @@ This is a cram test for the new executable.



[h]elp [q]uit [n/p]avigate [t]oggle view [r]ender mode
Type 'h' to go to the help panel, 'q' to quit, 'n' to go to the next operation, 'p' to go to the previous operation. Press 't' to toggle view mode.

$ dummy_terminal example.diff n n n t
Operation 4 of 14, 1 hunk
Expand All @@ -207,20 +207,20 @@ This is a cram test for the new executable.
@@ -1,39 @@ @@ +1,25 @@
1 open Nottui 1 open Nottui
2 module W = Nottui_widgets 2 module W = Nottui_widgets
3 open Lwd_infix 3 (* open Lwd_infix *)
4
5 type patch = unit
3 - open Lwd_infix 3 + (* open Lwd_infix *)
4 -
5 - type patch = unit
6 4
7 let pure_str s = Lwd.pure (W.string s) 5 let pure_str s = Lwd.pure (W.string s)
8
9 let string_of_counter c =
10 let$ c = c in
11 W.string (string_of_int c)
12
8 -
9 - let string_of_counter c =
10 - let$ c = c in
11 - W.string (string_of_int c)
12 -
13 let quit = Lwd.var false 6 let quit = Lwd.var false
14 let counter = Lwd.var 0 7 let string_of_operation = Format.asprintf "%a" (Patch.pp_operation ~gi
15 let counter_d = Lwd.get counter
[h]elp [q]uit [n/p]avigate [t]oggle view [r]ender mode
14 - let counter = Lwd.var 0 7 + let string_of_operation = Format.asprintf "%a" (Patch.pp_operation ~
15 - let counter_d = Lwd.get counter
Type 'h' to go to the help panel, 'q' to quit, 'n' to go to the next operation, 'p' to go to the previous operation. Press 't' to toggle view mode.


$ dummy_terminal example.diff n n n n t
Expand All @@ -230,9 +230,9 @@ This is a cram test for the new executable.
@@ -1,5 @@ @@ +1,3 @@
1 (** Render and navigate through a diff. *) 1 (** Render and navigate through a diff. *)
2 2
3 type patch = unit 3 val start : Patch.t list -> unit
4
5 val start : patch -> unit
3 - type patch = unit 3 + val start : Patch.t list -> unit
4 -
5 - val start : patch -> unit



Expand All @@ -243,15 +243,15 @@ This is a cram test for the new executable.



[h]elp [q]uit [n/p]avigate [t]oggle view [r]ender mode
Type 'h' to go to the help panel, 'q' to quit, 'n' to go to the next operation, 'p' to go to the previous operation. Press 't' to toggle view mode.


$ dummy_terminal example.diff n n n n n t
Operation 6 of 14, 1 hunk
1 addition, 1 removal
Rename with modifications dir1/file.txt to dir2/file.txt
@@ -1,1 @@ @@ +1,1 @@
1 This is the original content. 1 This is the modified content.
1 - This is the original content. 1 + This is the modified content.



Expand All @@ -266,15 +266,15 @@ This is a cram test for the new executable.



[h]elp [q]uit [n/p]avigate [t]oggle view [r]ender mode
Type 'h' to go to the help panel, 'q' to quit, 'n' to go to the next operation, 'p' to go to the previous operation. Press 't' to toggle view mode.

$ dummy_terminal example.diff n n n n n n n t
Operation 8 of 14, 1 hunk
2 additions, 1 removal
Rename with modifications dir1/file.txt to dir2/file.txt
@@ -1,1 @@ @@ +1,2 @@
1 This is the original content. 1 Here is some additional line.
2 Deleted line 1 and added this.
1 - This is the original content. 1 + Here is some additional line.
2 + Deleted line 1 and added this.



Expand All @@ -288,14 +288,14 @@ This is a cram test for the new executable.



[h]elp [q]uit [n/p]avigate [t]oggle view [r]ender mode
Type 'h' to go to the help panel, 'q' to quit, 'n' to go to the next operation, 'p' to go to the previous operation. Press 't' to toggle view mode.

$ dummy_terminal example.diff n n n n n n n n n t
Operation 10 of 14, 1 hunk
0 additions, 1 removal
Deletion of dir1/file.txt
@@ -1,1 @@ @@ +1,0 @@
1 some text
@@ -1,1 @@ @@ +0,0 @@
1 - some text



Expand All @@ -310,15 +310,15 @@ This is a cram test for the new executable.



[h]elp [q]uit [n/p]avigate [t]oggle view [r]ender mode
Type 'h' to go to the help panel, 'q' to quit, 'n' to go to the next operation, 'p' to go to the previous operation. Press 't' to toggle view mode.

$ dummy_terminal example.diff n n n n n n n n n n n n t
Operation 13 of 14, 1 hunk
2 additions, 0 removals
Creation of dir2/sample.txt
@@ -1,0 @@ @@ +1,2 @@
1 some text
2 lorem ipsum
@@ -0,0 @@ @@ +1,2 @@
1 + some text
2 + lorem ipsum



Expand All @@ -332,14 +332,14 @@ This is a cram test for the new executable.



[h]elp [q]uit [n/p]avigate [t]oggle view [r]ender mode
Type 'h' to go to the help panel, 'q' to quit, 'n' to go to the next operation, 'p' to go to the previous operation. Press 't' to toggle view mode.

$ dummy_terminal example.diff n n n n n n n n n n n n n n n t
Operation 14 of 14, 1 hunk
1 addition, 0 removals
Rename with modifications dir1/file.txt to dir2/file.txt
@@ -1,0 @@ @@ +1,1 @@
1 new text
@@ -0,0 @@ @@ +1,1 @@
1 + new text



Expand All @@ -354,15 +354,15 @@ This is a cram test for the new executable.



[h]elp [q]uit [n/p]avigate [t]oggle view [r]ender mode
Type 'h' to go to the help panel, 'q' to quit, 'n' to go to the next operation, 'p' to go to the previous operation. Press 't' to toggle view mode.


$ dummy_terminal example.diff n n n n n n n n n n n n n n n n t
Operation 14 of 14, 1 hunk
1 addition, 0 removals
Rename with modifications dir1/file.txt to dir2/file.txt
@@ -1,0 @@ @@ +1,1 @@
1 new text
@@ -0,0 @@ @@ +1,1 @@
1 + new text



Expand All @@ -377,7 +377,7 @@ This is a cram test for the new executable.



[h]elp [q]uit [n/p]avigate [t]oggle view [r]ender mode
Type 'h' to go to the help panel, 'q' to quit, 'n' to go to the next operation, 'p' to go to the previous operation. Press 't' to toggle view mode.



Expand Down

0 comments on commit 97bda80

Please sign in to comment.