Skip to content

Commit fb8b9ee

Browse files
committed
fix assert expr literal
1 parent adbc756 commit fb8b9ee

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

LICENSE-APACHE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright (c) 2024 Basjoofan Contributors
189+
Copyright (c) 2025 Basjoofan Contributors
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

LICENSE-MIT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2024 Basjoofan Contributors
3+
Copyright (c) 2025 Basjoofan Contributors
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

lib/src/evaluator.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ fn eval_call_expr(name: &str, arguments: &[Expr], context: &mut Context) -> Resu
187187
.iter()
188188
.filter_map(|assert| match assert {
189189
Expr::Binary(token, left, right) => {
190+
let expr = format!("{} {} {}", left, token, right);
190191
let left = eval_expr(left, &mut local).unwrap_or(Value::Null);
191192
let right = eval_expr(right, &mut local).unwrap_or(Value::Null);
192193
match token.kind {
@@ -199,7 +200,7 @@ fn eval_call_expr(name: &str, arguments: &[Expr], context: &mut Context) -> Resu
199200
_ => None,
200201
}
201202
.map(|result| Assert {
202-
expr: format!("{} {} {}", left, token, right),
203+
expr,
203204
left: left.to_string(),
204205
compare: token.to_string(),
205206
right: right.to_string(),

lib/src/http/response.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ fn parse<T: std::str::FromStr + std::default::Default>(str: Option<&str>) -> T {
9898
#[test]
9999
fn test_from_message_json() {
100100
let message = r#"HTTP/1.1 200 OK
101-
Date: Sun, 21 Jul 2024 14:32:11 GMT
101+
Date: Sun, 21 Jul 2025 14:32:11 GMT
102102
Content-Type: application/json
103103
Content-Length: 33
104104
Connection: close

0 commit comments

Comments
 (0)