From 4d9fd8502bba3a11d52f8cc966b2cfbbf5bc4233 Mon Sep 17 00:00:00 2001 From: Krasimir Date: Sun, 1 Dec 2024 17:41:33 +0100 Subject: [PATCH] test --- assignment | Bin 16512 -> 0 bytes checkargs.sh | 24 ++++++++---------------- 2 files changed, 8 insertions(+), 16 deletions(-) delete mode 100644 assignment diff --git a/assignment b/assignment deleted file mode 100644 index 2f66cfadcb633d1ae1b4b576dc1f7642ff626266..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16512 zcmeHOeQ;FO6~CJRh6*GgD4+6*f*{Qj!iOkDLg2y10S$pvbhM96b~o9X{YZD;O5y;b zX&uugGt{war~L!1t+wTlOr;K;VaA|H(4qqlIykkMvFc>UYO%GJ`oZ>h?!9OC?dz_# z)_>aBo5?%({LaU{_q==G-uvFYcbOa4S9m;vQ>D0GNN$os8nj?=1#1Y=AXbR+xXu=r zi!p#l;lDwP-SkX_5-_dOdX=DLH|3Au)B^b!s~|U8l?hQ!0bfmbdM|mnpAV+s&M#{J7~-1q-HJ-e%ZQT>jm} zx4A`^SL!|t==d|$;T4M_;kM;V7exZKk#H>4UE954dF}G0-elZcFRMWHGVo7*YQv4K z0&WHg<8Dx~NAc{BWRta=^e46&(-%Cn;#kYiZhhmnMH`Q`OxS%d=}^7NhIA;AKV3!1 zQ~nbCla7kV-C$}YMhf$1?VWil_)?Ve#nO0ydT1AjuPK2)0Ng0hR1B40%ulEUenSbI zDq76X<`Q^Q348#!fq!?J4WO8R8VAL2!iwS3O5k)4is>&bfj!!7lcr3Wp-xdkNaYr;B z(*;{fwWuOmS%J~u!8QL^oTGq{BnisTfrCGI5VxvQ?9y0jdKkYH72-ZpM&jo)$9GuY zjBWb)%lLkcS2aj8!8r40Rx6zPg>&2vJ8*tRkmiU3|C%zD*K-bhq60tg!0CCyiTejV zkLdZpsZ;CI&l`)jorg1vtz$Y*WI_SWw9r$qv&V7Z%Cmp!H`7nm(W+-f$H3_%Sa2LTzDvK63HzyZC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dtl<=ENI#Vs{Uj$+!3P}t*Dh{t#4Vg$+XNH*IC#azwVYB*KBH9 z3mAt(EYqi@zI83a+OYAa#x)zQo7S)2Vs5pzu4&w8T5|h;1MkU~8}Z${{Bu(5*#Ep; z`s&0$PMdtuIfDYg3I_bPUmp!9lu$&}VSxf%9xW(95OVlXrvdl`f=i+BxPTQ%#;s1A zP@tm(O*g?Z5RO@?B;L2uQHKIsb=08%QfDIyAlx%L?$DM@>T0Od5cJlyKu;a9D1hid zMFC)0IP1W-j}Ac;J=surwxZAhbr1~JWKY!gw}ILTMLRi1Z=e%h!i(3^L2pMa<;6RD zRL$;jKy9fo&M}1p8d}rXR7?F|s(1QvHpCm~iJ=HZ?Szutf%n>Yk6pl6kR^f%0B_7GA8ITp3(lh`e>4nd z${aUFcrgfRjO3mMUp_QL4mpXSxx|Dbxt2iN+ zBjdDppTDE`}=hii3fW+$>F5lh$hoD3Djiih;tnHZcx{B;6W^VgO zfKg1?fA05C|1R?S5h^md@BdGLI_(W@$Ml@GW1_{mVjg$d*XZ>}j57r@#Nm(Ol#3#haGJilbh>vPt3$L~39&-Y&#T2s^MIf26Y{%I}o zA~IAytMPoE=~7nI)Ls7XUG~j$lp<4#uQR#Je;dLH_~-R7zjxsCvTl9mnSKD;Fax|JNpZRexCSP1W&ueSyl*Sj?Pt@gWb#^P*eqIhy8LBHKC*{7QBp*W)@(Y(sR4{`Ah3^uDh~S*AdtYE&~@U{t2W-Y{~!t diff --git a/checkargs.sh b/checkargs.sh index a183fe0..577023c 100755 --- a/checkargs.sh +++ b/checkargs.sh @@ -1,23 +1,15 @@ #!/bin/bash -# Parameters -COMMAND="$1" -EXPECTED_OUTPUT="$2" +# Capture the command and expected output +program=$1 +expected_output=$2 -# Run the command and capture the output -ACTUAL_OUTPUT=$($COMMAND) +# Run the program and capture its output +output=$($program) -# Compare the actual output with the expected output -if [ "$ACTUAL_OUTPUT" == "$EXPECTED_OUTPUT" ]; then - echo "✅ Test passed!" +# Compare the output with the expected string +if [ "$output" == "$expected_output" ]; then exit 0 else - echo "❌ Test failed!" - echo "Expected output:" - echo "================" - echo "$EXPECTED_OUTPUT" - echo "Actual output:" - echo "================" - echo "$ACTUAL_OUTPUT" exit 1 -fi +fi \ No newline at end of file