MCPcopy Create free account
hub / github.com/PRQL/prql / debug_json_schema

Function debug_json_schema

prqlc/prqlc/src/cli/test.rs:549–568  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

547// standard output parses as JSON and check a couple top-level keys.
548#[test]
549fn debug_json_schema() {
550 use serde_json::Value;
551
552 let output = prqlc_command()
553 .args(["debug", "json-schema", "--ir-type", "pl"])
554 .output()
555 .unwrap();
556
557 assert!(output.status.success());
558
559 let stdout = std::str::from_utf8(&output.stdout).unwrap();
560 let parsed: Value = serde_json::from_str(stdout).unwrap();
561
562 assert_eq!(
563 parsed["$schema"],
564 "https://json-schema.org/draft/2020-12/schema"
565 );
566 assert_eq!(parsed["type"], "object");
567 assert_eq!(parsed["title"], "ModuleDef");
568}
569
570#[test]
571fn shell_completion() {

Callers

nothing calls this directly

Calls 1

prqlc_commandFunction · 0.70

Tested by

no test coverage detected