MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_file_add

Function test_file_add

atomic-core/src/change/graph_op.rs:680–694  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

678
679 #[test]
680 fn test_file_add() {
681 let graph_op: GraphOp<Hash> = GraphOp::FileAdd {
682 add_name: test_new_vertex(),
683 add_inode: test_new_vertex(),
684 contents: Some(test_new_vertex()),
685 path: "README.md".to_string(),
686 encoding: Some(Encoding::Utf8),
687 };
688
689 assert!(graph_op.is_file_operation());
690 assert!(!graph_op.is_content_edit());
691 assert_eq!(graph_op.path(), Some("README.md"));
692 assert_eq!(graph_op.encoding(), Some(Encoding::Utf8));
693 assert_eq!(graph_op.type_name(), "FileAdd");
694 }
695
696 #[test]
697 fn test_file_del() {

Callers

nothing calls this directly

Calls 1

test_new_vertexFunction · 0.70

Tested by

no test coverage detected