From 6b8057624d1134e1e9fb02d7a215947f45a39ae4 Mon Sep 17 00:00:00 2001 From: Romain Date: Thu, 26 Oct 2023 14:07:21 +0200 Subject: [PATCH] continue regex exercice --- Regex/run | 18 +++++++++--------- Regex/task.yaml | 1 + 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Regex/run b/Regex/run index 7291cde..372f502 100644 --- a/Regex/run +++ b/Regex/run @@ -19,10 +19,10 @@ global_success=true if diff student_result1 good_result1; then feedback-result --id regex1 success - feedback-msg -em --id regex1 "Correct" + feedback-msg -e -m "Correct" --id regex1 else feedback-result --id regex1 failed - feedback-msg -em --id regex1 "Votre sortie : $(head --lines=10 student_result1)" + feedback-msg -e -m "Votre sortie : $(head --lines=10 student_result1)" --id regex1 global_success=false fi @@ -31,10 +31,10 @@ grep -oP '\[.*?\]' apache.log > good_result2 if diff student_result2 good_result2; then feedback-result --id regex2 success - feedback-msg -em --id regex2 "Correct" + feedback-msg -e -m "Correct" --id regex2 else feedback-result --id regex2 failed - feedback-msg -em --id regex2 "Votre sortie : $(head --lines=10 student_result2)" + feedback-msg -e -m "Votre sortie : $(head --lines=10 student_result2)" --id regex2 global_success=false fi @@ -43,10 +43,10 @@ grep -oP '"GET\s.*?"' apache.log > good_result3 if diff student_result3 good_result3; then feedback-result --id regex3 success - feedback-msg -em --id regex3 "Correct" + feedback-msg -e -m "Correct" --id regex3 else feedback-result --id regex3 failed - feedback-msg -em --id regex3 "Votre sortie : $(head --lines=10 student_result3)" + feedback-msg -e -m "Votre sortie : $(head --lines=10 student_result3)" --id regex13 global_success=false fi @@ -55,10 +55,10 @@ grep -oP '^.*200.*$' apache.log > good_result4 if diff student_result4 good_result4; then feedback-result --id regex4 success - feedback-msg -em --id regex4 "Correct" + feedback-msg -e -m "Correct" --id regex4 else feedback-result --id regex4 failed - feedback-msg -em --id regex4 "Votre sortie : $(head --lines=10 student_result4)" + feedback-msg -e -m "Votre sortie : $(head --lines=10 student_result4)" --id regex4 global_success=false fi @@ -66,6 +66,6 @@ if [ $global_success ]; then feedback-result success feedback-msg -em "Bravo, vous avez réussi" else - feedback-result success + feedback-result failed feedback-msg -em "Vous avez quelques erreurs" fi \ No newline at end of file diff --git a/Regex/task.yaml b/Regex/task.yaml index 244495b..1283fec 100644 --- a/Regex/task.yaml +++ b/Regex/task.yaml @@ -22,6 +22,7 @@ context: |- Votre objectif sera d'extraire certaines informations à l'aide de regex. environment_id: default +accessible: true environment_parameters: limits: time: '3'