Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs3-19sp
project00
Commits
f1ed2619
There was a problem fetching linked pipelines.
Commit
f1ed2619
authored
5 years ago
by
Caleb C. Sander
Browse files
Options
Download
Email Patches
Plain Diff
Add .gitignore
parent
0ee03f20
Pipeline
#29759
canceled with stage
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitignore
+3
-0
.gitignore
testers/test-longest
+3
-1
testers/test-longest
testers/test-wc
+3
-1
testers/test-wc
with
9 additions
and
2 deletions
+9
-2
.gitignore
0 → 100644
View file @
f1ed2619
a.out
longest
mywc
This diff is collapsed.
Click to expand it.
testers/test-longest
View file @
f1ed2619
#!/bin/bash
COMPILE_CMD
=
'clang -g -o longest longest.c'
COMPILE_CMD
=
'clang -g -o longest longest.c'
STUDENT_CMD
=
'./longest $@'
STUDENT_CMD
=
'./longest $@'
REF_CMD
=
'cat $@ | sed "s/ /\n/g" | sort | uniq | awk "{print length, \$0}" | sort -nr | head -n 1 | sed -e "s/.* //"'
REF_CMD
=
'cat $@ | sed "s/ /\n/g" | sort | uniq | awk "{print length, \$0}" | sort -nr | head -n 1 | sed -e "s/.* //"'
...
@@ -23,7 +25,7 @@ function test() {
...
@@ -23,7 +25,7 @@ function test() {
diff <
(
eval
$REF_CMD
)
.output
;
diff <
(
eval
$REF_CMD
)
.output
;
diff_ret
=
$?
diff_ret
=
$?
if
[
$diff_ret
-eq
0
]
&&
[
$leak
-eq
0
]
&&
[
$valgrind_error
-ne
101
]
;
then
if
[
$diff_ret
-eq
0
]
&&
[
$leak
-eq
0
]
&&
[
$valgrind_error
-ne
101
]
;
then
echo "$1: Passed";
echo
"
$1
: Passed"
;
elif
[
$valgrind_error
-eq
101
]
;
then
elif
[
$valgrind_error
-eq
101
]
;
then
echo
"
$1
: Execution Error"
echo
"
$1
: Execution Error"
elif
[
$diff_ret
-ne
0
]
;
then
elif
[
$diff_ret
-ne
0
]
;
then
...
...
This diff is collapsed.
Click to expand it.
testers/test-wc
View file @
f1ed2619
#!/bin/bash
COMPILE_CMD
=
'clang -g -o mywc wc.c'
COMPILE_CMD
=
'clang -g -o mywc wc.c'
STUDENT_CMD
=
'./mywc $@'
STUDENT_CMD
=
'./mywc $@'
REF_CMD
=
'wc -l $@ 2>&1'
REF_CMD
=
'wc -l $@ 2>&1'
...
@@ -22,7 +24,7 @@ function test() {
...
@@ -22,7 +24,7 @@ function test() {
diff <
(
eval
$REF_CMD
)
.output
;
diff <
(
eval
$REF_CMD
)
.output
;
diff_ret
=
$?
diff_ret
=
$?
if
[
$diff_ret
-eq
0
]
&&
[
$leak
-eq
0
]
&&
[
$valgrind_error
-ne
101
]
;
then
if
[
$diff_ret
-eq
0
]
&&
[
$leak
-eq
0
]
&&
[
$valgrind_error
-ne
101
]
;
then
echo "$1: Passed";
echo
"
$1
: Passed"
;
elif
[
$valgrind_error
-eq
101
]
;
then
elif
[
$valgrind_error
-eq
101
]
;
then
echo
"
$1
: Execution Error"
echo
"
$1
: Execution Error"
elif
[
$diff_ret
-ne
0
]
;
then
elif
[
$diff_ret
-ne
0
]
;
then
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help