Skip to content

Commit

Permalink
update hello checks
Browse files Browse the repository at this point in the history
  • Loading branch information
CarterZenke committed Jan 30, 2023
1 parent 02dc1f7 commit 4880c33
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 3 deletions.
File renamed without changes.
11 changes: 8 additions & 3 deletions hello/__init__.py → me/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ def emma():
check50.run("./hello").stdin("Emma").stdout("Emma").exit()

@check50.check(compiles)
def rodrigo():
"""responds to name Rodrigo"""
check50.run("./hello").stdin("Rodrigo").stdout("Rodrigo").exit()
def inno():
"""responds to name Inno"""
check50.run("./hello").stdin("Inno").stdout("Inno").exit()

@check50.check(compiles)
def kamryn():
"""responds to name Kamryn"""
check50.run("./hello").stdin("Kamryn").stdout("Kamryn").exit()
7 changes: 7 additions & 0 deletions world/.cs50.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
check50:
files: &check50_files
- !exclude "*"
- !require hello.c

submit50:
files: *check50_files
17 changes: 17 additions & 0 deletions world/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import check50
import check50.c

@check50.check()
def exists():
"""hello.c exists"""
check50.exists("hello.c")

@check50.check(exists)
def compiles():
"""hello.c compiles"""
check50.c.compile("hello.c", lcs50=True)

@check50.check(compiles)
def world():
"""hello.c prints \"hello, world\""""
check50.run("./hello").stdout("hello, world").exit()

0 comments on commit 4880c33

Please sign in to comment.