test: fix running tests
This commit is contained in:
parent
8f3c426359
commit
5bf277cf14
3 changed files with 35 additions and 18 deletions
|
@ -14,8 +14,17 @@ pub fn from_ron(raw: &str) -> Rpl {
|
|||
#[derive(Serialize, Deserialize, PartialEq, Eq, Debug)]
|
||||
pub struct Rpl(pub Vec<Instruction>);
|
||||
|
||||
#[test]
|
||||
fn test_simple_deserialize() {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::instructions::{
|
||||
read::{SourceFormat, SourceType},
|
||||
write::{TargetFormat, TargetType},
|
||||
MathInstruction,
|
||||
};
|
||||
|
||||
#[test]
|
||||
fn test_simple_deserialize() {
|
||||
const TEST_DATA: &str =
|
||||
"([Read( (source: File(\"~/example/file.png\"), format: Png) ),Math(Add),Write(( target: File(\"~/example/out.jpg\"), format: Jpeg))])";
|
||||
|
||||
|
@ -33,4 +42,5 @@ fn test_simple_deserialize() {
|
|||
})
|
||||
])
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
just nushell
|
||||
typst typst-lsp
|
||||
mold
|
||||
cargo-nextest
|
||||
];
|
||||
})
|
||||
];
|
||||
|
|
6
justfile
6
justfile
|
@ -1,3 +1,5 @@
|
|||
all: test docs
|
||||
|
||||
# Compile all documentation as in proposals and design documents, placing them under `docs/compiled`.
|
||||
docs:
|
||||
#!/usr/bin/env nu
|
||||
|
@ -9,3 +11,7 @@ docs:
|
|||
)
|
||||
mv $pdf docs/compiled
|
||||
} | ignore
|
||||
|
||||
test:
|
||||
#!/usr/bin/env nu
|
||||
cargo nextest run
|
||||
|
|
Loading…
Reference in a new issue