1
0
Fork 0
mirror of https://codeberg.org/Mo8it/How_To_Linux.git synced 2024-12-05 01:40:32 +00:00

Compare commits

...

2 commits

Author SHA1 Message Date
8b90df6fe7 Fix some checks 2023-08-14 15:30:17 +02:00
5d6acdbc9e Fix Max filename 2023-08-14 14:54:37 +02:00
6 changed files with 7 additions and 7 deletions

View file

@ -50,7 +50,7 @@ pub fn task() -> Task {
Check::builder()
.description("Looking for Max in the living room")
.validator(FileContent {
file: PathBuf::from("living_room/max.txt"),
file: PathBuf::from("living_room/Max.txt"),
expected: StringContent::Part("beatboxing"),
})
.hint("Did you add his hobby `beatboxing` to his file?")

View file

@ -49,7 +49,7 @@ pub fn task() -> Task {
.validator(FileContent {
file: fish_history.clone(),
expected: StringContent::Regex(
Regex::new(r"lolcat.* (-r |--random)").expect("Failed to build a regex"),
Regex::new(r"lolcat.* (-r( |\n)|--random)").expect("Failed to build a regex"),
),
})
.hint("Did you read the help message of `lolcat` to find out how to add randomness to the output colors?")

View file

@ -10,7 +10,7 @@ pub fn task() -> Task {
file: dirs::home_dir()
.expect("Failed to get the home directory!")
.join(".local/share/fish/fish_history"),
expected: StringContent::Part("\n- cmd: dnf upgrade"),
expected: StringContent::Part("\n- cmd: sudo dnf upgrade"),
})
.hint("Did you try to update the system? Are you in the fish shell?")
.build()

View file

@ -26,7 +26,7 @@ pub fn task() -> Task {
.command(
Command::builder()
.program("ls")
.args(vec!["living_room/max.txt".into()])
.args(vec!["living_room/Max.txt".into()])
.stdout(StdioVariant::Null)
.stderr(StdioVariant::Null)
.stdin(StdioVariant::Null)
@ -41,7 +41,7 @@ pub fn task() -> Task {
Check::builder()
.description("Looking for Max")
.validator(FileContent {
file: PathBuf::from("bedroom/max.txt"),
file: PathBuf::from("bedroom/Max.txt"),
expected: StringContent::Part("beatboxing"),
})
.hint("Did you move Max into the bedroom? Does he still have his hobby?")

View file

@ -32,7 +32,7 @@ pub fn task() -> Task {
Check::builder()
.description("Looking for Max")
.validator(FileContent {
file: PathBuf::from("bedroom/max.txt"),
file: PathBuf::from("bedroom/Max.txt"),
expected: StringContent::Part("beatboxing"),
})
.hint("Is Max in the bedroom? Does he still have his hobby?")

View file

@ -64,7 +64,7 @@ Place Max in the living room by creating a file `Max.txt` in the living room con
Example:
```console
$ cat living_room/max.txt
$ cat living_room/Max.txt
He is watching TV.
His hobby is beatboxing.
```