1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// =====================================================================================
// File: directive_validation_tests.rs
// Location: library/src/internal_tests/
// -------------------------------------------------------------------------------------
// Purpose:
// Internal tests for validation of YAML directive usage in the babbel_yaml crate.
// These tests ensure that directives such as %YAML are correctly validated for
// placement, required document content, and error reporting according to the YAML spec.
//
// Context:
// - Part of the babbel_yaml project, a Rust YAML parser/serializer.
// - Focuses on error handling and validation for directive placement and usage.
// - Ensures robust error reporting and spec compliance for directive-related issues.
//
// -------------------------------------------------------------------------------------
// Test Coverage:
// - %YAML directive without document content
// - Directives followed by end marker only
// - Proper directive usage with valid documents
// - Error message validation for directive misuse
// =====================================================================================