rust/tests/run-make-fulldeps/save-analysis-rfc2126/validate_json.py

8 lines
190 B
Python
Raw Normal View History

#!/usr/bin/env python
import sys
import json
crates = json.loads(sys.stdin.readline().strip())["prelude"]["external_crates"]
assert any(map(lambda c: c["id"]["name"] == "krate2", crates))