Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update config.json and add hello-world exercise #3

Merged
merged 17 commits into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
3b981df
feat: update config.json and add hello-world exercise
GroophyLifefor Jan 5, 2024
0469d1c
feat: tags added.
GroophyLifefor Jan 5, 2024
6e73162
feat: invalid tag updated.
GroophyLifefor Jan 5, 2024
d758dbf
feat: test file's name updated.
GroophyLifefor Jan 5, 2024
2c3632b
feat: EOL added to reference.
GroophyLifefor Jan 7, 2024
bf2d964
feat: EOL added to src.
GroophyLifefor Jan 7, 2024
7530e31
feat: EOL added to test file.
GroophyLifefor Jan 7, 2024
a99688d
feat: possible different platform.
GroophyLifefor Jan 7, 2024
38c5341
feat: added more tags, ref: https://github.com/exercism/batch/pull/3#…
GroophyLifefor Jan 9, 2024
129e9ce
feat: blurb updated, ref: https://github.com/exercism/batch/pull/3#di…
GroophyLifefor Jan 9, 2024
e8ee908
feat: typo fix, ref: https://github.com/exercism/batch/pull/3#discuss…
GroophyLifefor Jan 9, 2024
7e9749e
feat: file name typo fix and path update, ref: https://github.com/exe…
GroophyLifefor Jan 9, 2024
6f0ef80
Merge branch 'initialize' of https://github.com/exercism/batch into i…
GroophyLifefor Jan 9, 2024
a9c8708
feat: path updated, ref: https://github.com/exercism/batch/pull/3#dis…
GroophyLifefor Jan 9, 2024
bfdb02d
feat: typo fix, ref: https://github.com/exercism/batch/pull/3#discuss…
GroophyLifefor Jan 9, 2024
55f628b
feat: workflow fix.
GroophyLifefor Jan 9, 2024
53bd2bc
Merge branch 'initialize' of https://github.com/exercism/batch into i…
GroophyLifefor Jan 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"representer": false,
"analyzer": false
},
"blurb": "TODO: add blurb",
"blurb": "Sequential commands automate tasks in Windows OS via .bat or .cmd files.",
GroophyLifefor marked this conversation as resolved.
Show resolved Hide resolved
"version": 3,
"online_editor": {
"indent_style": "space",
Expand All @@ -22,9 +22,23 @@
},
"exercises": {
"concept": [],
"practice": []
"practice": [
{
"uuid": "d4919f7e-5e88-48a1-a357-e79cd6f98346",
"slug": "hello-world",
"name": "Hello World",
"practices": [
"basics"
],
"prerequisites": [],
"difficulty": 1
}
]
},
"concepts": [],
"key_features": [],
"tags": []
"tags": [
"platform/windows",
"used_for/scripts"
]
GroophyLifefor marked this conversation as resolved.
Show resolved Hide resolved
}
16 changes: 16 additions & 0 deletions exercises/practice/hello-world/.docs/instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Instructions

The classical introductory exercise.
Just say "Hello, World!".

["Hello, World!"][hello-world] is the traditional first program for beginning programming in a new language or environment.

The objectives are simple:

- Modify the provided code so that it produces the string "Hello, World!".
- Run the test suite and make sure that it succeeds.
GroophyLifefor marked this conversation as resolved.
Show resolved Hide resolved
- Submit your solution and check it at the website.

If everything goes well, you will be ready to fetch your first real exercise.
GroophyLifefor marked this conversation as resolved.
Show resolved Hide resolved

[hello-world]: https://en.wikipedia.org/wiki/%22Hello,_world!%22_program
17 changes: 17 additions & 0 deletions exercises/practice/hello-world/.meta/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"authors": ["GroophyLifefor"],
"files": {
"solution": [
"src/main/Greeter.bat"
],
"test": [
"src/test/GreeterTest.bat"
],
"example": [
".meta/src/reference/Greeter.bat"
]
},
"blurb": "Exercism's classic introductory exercise. Just say \"Hello, World!\".",
"source": "This is an exercise to introduce users to using Exercism",
"source_url": "https://en.wikipedia.org/wiki/%22Hello,_world!%22_program"
}
GroophyLifefor marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@echo Hello, World!
GroophyLifefor marked this conversation as resolved.
Show resolved Hide resolved
13 changes: 13 additions & 0 deletions exercises/practice/hello-world/.meta/tests.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# This is an auto-generated file.
#
# Regenerating this file via `configlet sync` will:
# - Recreate every `description` key/value pair
# - Recreate every `reimplements` key/value pair, where they exist in problem-specifications
# - Remove any `include = true` key/value pair (an omitted `include` key implies inclusion)
# - Preserve any other key/value pair
#
# As user-added comments (using the # character) will be removed when this file
# is regenerated, comments can be added via a `comment` key.

[af9ffe10-dc13-42d8-a742-e7bdafac449d]
description = "Say Hi!"
1 change: 1 addition & 0 deletions exercises/practice/hello-world/src/main/Greeter.bat
GroophyLifefor marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@Echo Goodbye, Me!
GroophyLifefor marked this conversation as resolved.
Show resolved Hide resolved
23 changes: 23 additions & 0 deletions exercises/practice/hello-world/src/test/GreeterTest.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@echo off
REM ---------------------------------------------------
REM testThatGreeterReturnsTheCorrectGreeting
REM ---------------------------------------------------

REM Initalize result variable
set "result="
set "expected=Hello, World!"
REM Run the program and store the output in the result variable
for /f "delims=" %%a in ('%~1') do set result=%%a

REM Check if the result is correct
if "%result%" == "%expected%" (
REM If the result is correct, exit with code 0
echo Test passed
exit /b 0
GroophyLifefor marked this conversation as resolved.
Show resolved Hide resolved
) else (
REM If the result is incorrect, exit with code 1
echo Expected: %expected%
echo Actually: %result%
echo Test failed
exit /b 1
)
GroophyLifefor marked this conversation as resolved.
Show resolved Hide resolved