diff --git a/HelloWorld.py b/HelloWorld.py index 3568c85..2200e6a 100644 --- a/HelloWorld.py +++ b/HelloWorld.py @@ -1,2 +1,3 @@ #!/usr/bin/python3 -print("Hello,world!") +# Prints "Hello, World!" to the console +print("Hello, World!") diff --git a/Helloworld.cpp b/Helloworld.cpp index 6d8dc27..0203d9e 100644 --- a/Helloworld.cpp +++ b/Helloworld.cpp @@ -1,5 +1,5 @@ -#include +#include int main (){ - std:: cout << "Hello,World!" << std:: endl; + std::cout << "Hello, World!" << std::endl; return 0; } diff --git a/README.md b/README.md index d7d526e..d878d44 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ -# Hello-World- -My first repository in Github +# Hello World +My first repository on GitHub. A collection of Hello World programs in various languages. diff --git a/tests/test_hello.py b/tests/test_hello.py new file mode 100644 index 0000000..eb00827 --- /dev/null +++ b/tests/test_hello.py @@ -0,0 +1,6 @@ +import subprocess +import sys + +def test_python_output(): + result = subprocess.run([sys.executable, "HelloWorld.py"], capture_output=True, text=True, check=True) + assert result.stdout.strip() == "Hello, World!"