Skip to content

Commit

Permalink
Rationalize grep behavior
Browse files Browse the repository at this point in the history
Add tests for the combination of output channels that work
Fix issue #31
Fix issue #95
  • Loading branch information
mfragkoulis committed Sep 27, 2017
1 parent 0f9e80e commit 194d3f4
Show file tree
Hide file tree
Showing 129 changed files with 334 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core-tools/src/negotiate.c
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,7 @@ prepare_solution(void)
current_connections->edges_outgoing = NULL;
int *n_edges_incoming = &current_connections->n_edges_incoming;
int *n_edges_outgoing = &current_connections->n_edges_outgoing;
DPRINTF(4, "%s(): Node %s, pid: %d, connections in: %d, connections out: %d.",
DPRINTF(3, "%s(): Node %s, pid: %d, connections in: %d, connections out: %d.",
__func__, chosen_mb->node_array[i].name,
chosen_mb->node_array[i].pid,
*n_edges_incoming, *n_edges_outgoing);
Expand Down
1 change: 1 addition & 0 deletions simple-shell/grep-L-c-l-matching-lines-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input) 0
1 change: 1 addition & 0 deletions simple-shell/grep-L-c-l-matching-lines.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1 (standard input) hi
1 change: 1 addition & 0 deletions simple-shell/grep-L-c-l-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input) 0
1 change: 1 addition & 0 deletions simple-shell/grep-L-c-l.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1 (standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-L-c-matching-lines-l-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input) 0
1 change: 1 addition & 0 deletions simple-shell/grep-L-c-matching-lines-l.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1 hi (standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-L-c-matching-lines-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input) 0
1 change: 1 addition & 0 deletions simple-shell/grep-L-c-matching-lines.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1 hi
2 changes: 2 additions & 0 deletions simple-shell/grep-L-c-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
(standard input)
0
1 change: 1 addition & 0 deletions simple-shell/grep-L-c.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
1 change: 1 addition & 0 deletions simple-shell/grep-L-cat-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input)
Empty file added simple-shell/grep-L-cat.success
Empty file.
1 change: 1 addition & 0 deletions simple-shell/grep-L-l-c-matching-lines-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input) 0
1 change: 1 addition & 0 deletions simple-shell/grep-L-l-c-matching-lines.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input) 1 hi
1 change: 1 addition & 0 deletions simple-shell/grep-L-l-c-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input) 0
1 change: 1 addition & 0 deletions simple-shell/grep-L-l-c.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input) 1
1 change: 1 addition & 0 deletions simple-shell/grep-L-l-matching-lines-c-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input) 0
1 change: 1 addition & 0 deletions simple-shell/grep-L-l-matching-lines-c.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input) hi 1
1 change: 1 addition & 0 deletions simple-shell/grep-L-l-matching-lines-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-L-l-matching-lines.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input) hi
1 change: 1 addition & 0 deletions simple-shell/grep-L-l-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-L-l.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-L-matching-lines-c-l-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input) 0
1 change: 1 addition & 0 deletions simple-shell/grep-L-matching-lines-c-l.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hi 1 (standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-L-matching-lines-c-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input) 0
1 change: 1 addition & 0 deletions simple-shell/grep-L-matching-lines-c.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hi 1
1 change: 1 addition & 0 deletions simple-shell/grep-L-matching-lines-l-c-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input) 0
1 change: 1 addition & 0 deletions simple-shell/grep-L-matching-lines-l-c.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hi (standard input) 1
1 change: 1 addition & 0 deletions simple-shell/grep-L-matching-lines-l-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-L-matching-lines-l.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hi (standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-L-matching-lines-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-L-matching-lines.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hi
1 change: 1 addition & 0 deletions simple-shell/grep-L-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input)
Empty file added simple-shell/grep-L.success
Empty file.
1 change: 1 addition & 0 deletions simple-shell/grep-c-L-l-matching-lines-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0 (standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-c-L-l-matching-lines.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1 (standard input) hi
1 change: 1 addition & 0 deletions simple-shell/grep-c-L-l-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0 (standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-c-L-l.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1 (standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-c-L-matching-lines-l-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0 (standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-c-L-matching-lines-l.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1 hi (standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-c-L-matching-lines-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0 (standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-c-L-matching-lines.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1 hi
1 change: 1 addition & 0 deletions simple-shell/grep-c-L-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0 (standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-c-L.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
1 change: 1 addition & 0 deletions simple-shell/grep-c-cat.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
1 change: 1 addition & 0 deletions simple-shell/grep-c-l-L-matching-lines-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0 (standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-c-l-L-matching-lines.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1 (standard input) hi
1 change: 1 addition & 0 deletions simple-shell/grep-c-l-L-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0 (standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-c-l-L.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1 (standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-c-l-matching-lines-L-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0 (standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-c-l-matching-lines-L.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1 (standard input) hi
1 change: 1 addition & 0 deletions simple-shell/grep-c-l-matching-lines.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1 (standard input) hi
2 changes: 2 additions & 0 deletions simple-shell/grep-c-l.success
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1
(standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-c-matching-lines-L-l-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0 (standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-c-matching-lines-L-l.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1 hi (standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-c-matching-lines-L-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0 (standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-c-matching-lines-L.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1 hi
1 change: 1 addition & 0 deletions simple-shell/grep-c-matching-lines-l-L-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0 (standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-c-matching-lines-l-L.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1 hi (standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-c-matching-lines-l.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1 hi (standard input)
2 changes: 2 additions & 0 deletions simple-shell/grep-c-matching-lines.success
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1
hi
1 change: 1 addition & 0 deletions simple-shell/grep-c.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
1 change: 1 addition & 0 deletions simple-shell/grep-f-cat.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hi
1 change: 1 addition & 0 deletions simple-shell/grep-f.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hi
1 change: 1 addition & 0 deletions simple-shell/grep-l-L-c-matching-lines-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input) 0
1 change: 1 addition & 0 deletions simple-shell/grep-l-L-c-matching-lines.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input) 1 hi
1 change: 1 addition & 0 deletions simple-shell/grep-l-L-c-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input) 0
1 change: 1 addition & 0 deletions simple-shell/grep-l-L-c.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input) 1
1 change: 1 addition & 0 deletions simple-shell/grep-l-L-matching-lines-c-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input) 0
1 change: 1 addition & 0 deletions simple-shell/grep-l-L-matching-lines-c.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input) hi 1
1 change: 1 addition & 0 deletions simple-shell/grep-l-L-matching-lines-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-l-L-matching-lines.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input) hi
1 change: 1 addition & 0 deletions simple-shell/grep-l-L-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-l-L.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-l-c-L-matching-lines-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0 (standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-l-c-L-matching-lines.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input) 1 hi
1 change: 1 addition & 0 deletions simple-shell/grep-l-c-L-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0 (standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-l-c-L.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input) 1
1 change: 1 addition & 0 deletions simple-shell/grep-l-c-matching-lines-L-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0 (standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-l-c-matching-lines-L.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input) 1 hi
1 change: 1 addition & 0 deletions simple-shell/grep-l-c-matching-lines.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input) 1 hi
2 changes: 2 additions & 0 deletions simple-shell/grep-l-c.success
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
(standard input)
1
1 change: 1 addition & 0 deletions simple-shell/grep-l-cat.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-l-matching-lines-L-c-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input) 0
1 change: 1 addition & 0 deletions simple-shell/grep-l-matching-lines-L-c.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input) hi 1
1 change: 1 addition & 0 deletions simple-shell/grep-l-matching-lines-L-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-l-matching-lines-L.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input) hi
1 change: 1 addition & 0 deletions simple-shell/grep-l-matching-lines-c-L-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0 (standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-l-matching-lines-c-L.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input) hi 1
1 change: 1 addition & 0 deletions simple-shell/grep-l-matching-lines-c.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input) hi 1
2 changes: 2 additions & 0 deletions simple-shell/grep-l-matching-lines.success
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
(standard input)
hi
1 change: 1 addition & 0 deletions simple-shell/grep-l.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-matching-lines-L-c-l-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input) 0
1 change: 1 addition & 0 deletions simple-shell/grep-matching-lines-L-c-l.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hi 1 (standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-matching-lines-L-c-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input) 0
1 change: 1 addition & 0 deletions simple-shell/grep-matching-lines-L-c.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hi 1
1 change: 1 addition & 0 deletions simple-shell/grep-matching-lines-L-l-c-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input) 0
1 change: 1 addition & 0 deletions simple-shell/grep-matching-lines-L-l-c.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hi (standard input) 1
1 change: 1 addition & 0 deletions simple-shell/grep-matching-lines-L-l-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-matching-lines-L-l.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hi (standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-matching-lines-L-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-matching-lines-L.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hi
1 change: 1 addition & 0 deletions simple-shell/grep-matching-lines-c-L-l-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0 (standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-matching-lines-c-L-l.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hi 1 (standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-matching-lines-c-L-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0 (standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-matching-lines-c-L.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hi 1
1 change: 1 addition & 0 deletions simple-shell/grep-matching-lines-c-l-L-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0 (standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-matching-lines-c-l-L.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hi 1 (standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-matching-lines-c-l.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hi 1 (standard input)
2 changes: 2 additions & 0 deletions simple-shell/grep-matching-lines-c.success
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
hi
1
1 change: 1 addition & 0 deletions simple-shell/grep-matching-lines-cat.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hi
1 change: 1 addition & 0 deletions simple-shell/grep-matching-lines-l-L-c-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input) 0
1 change: 1 addition & 0 deletions simple-shell/grep-matching-lines-l-L-c.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hi (standard input) 1
1 change: 1 addition & 0 deletions simple-shell/grep-matching-lines-l-L-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-matching-lines-l-L.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hi (standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-matching-lines-l-c-L-nomatch.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0 (standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-matching-lines-l-c-L.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hi (standard input) 1
1 change: 1 addition & 0 deletions simple-shell/grep-matching-lines-l-c.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hi (standard input) 1
2 changes: 2 additions & 0 deletions simple-shell/grep-matching-lines-l.success
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
hi
(standard input)
1 change: 1 addition & 0 deletions simple-shell/grep-matching-lines.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hi
1 change: 1 addition & 0 deletions simple-shell/grep-noargs-cat.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hi
1 change: 1 addition & 0 deletions simple-shell/grep-noargs.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hi
1 change: 1 addition & 0 deletions simple-shell/grep-o-cat.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hi
1 change: 1 addition & 0 deletions simple-shell/grep-o.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hi
1 change: 1 addition & 0 deletions simple-shell/grep-v-cat.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hi
1 change: 1 addition & 0 deletions simple-shell/grep-v.success
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hi
2 changes: 1 addition & 1 deletion unix-tools/grep
Submodule grep updated 1 files
+24 −20 src/grep.c
Loading

0 comments on commit 194d3f4

Please sign in to comment.