Skip to content

Commit

Permalink
Adjust header comments, add test cases (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
ralfhandl authored Feb 5, 2024
1 parent e9b721b commit 7952c35
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 25 deletions.
18 changes: 9 additions & 9 deletions abnf/odata-abnf-construction-rules.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
;------------------------------------------------------------------------------
; OData ABNF Construction Rules Version 4.01 and 4.0
; OData ABNF Construction Rules Version 4.02, 4.01, and 4.0
;------------------------------------------------------------------------------
; 17 September 2020
; 05 February 2024
;
; Latest version: https://github.com/oasis-tcs/odata-abnf/blob/main/abnf/odata-abnf-construction-rules.txt
;------------------------------------------------------------------------------
Expand All @@ -21,18 +21,18 @@
;
; Additional artifacts:
; This grammar is one component of a Work Product which consists of:
; - OData Version 4.01 Part 1: Protocol
; - OData Version 4.01 Part 2: URL Conventions
; - OData ABNF Construction Rules Version 4.01 (this document)
; - OData ABNF Test Cases Version 4.01
; - OData Version 4.02 Part 1: Protocol
; - OData Version 4.02 Part 2: URL Conventions
; - OData ABNF Construction Rules Version 4.02 (this document)
; - OData ABNF Test Cases Version 4.02
;
; Related work:
; This specification replaces or supersedes:
; - OData ABNF Construction Rules Version 4.0
; This work product is related to
; - OData Common Schema Definition Language (CSDL) JSON Representation Version 4.01
; - OData Common Schema Definition Language (CSDL) XML Representation Version 4.01
; - OData JSON Format Version 4.01
; - OData Common Schema Definition Language (CSDL) JSON Representation Version 4.02
; - OData Common Schema Definition Language (CSDL) XML Representation Version 4.02
; - OData JSON Format Version 4.02
;
; Abstract:
; The Open Data Protocol (OData) enables the creation of REST-based data
Expand Down
40 changes: 24 additions & 16 deletions abnf/odata-abnf-testcases.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# OData ABNF Test Cases Version 4.01 and 4.0
# OData ABNF Test Cases Version 4.02, 4.01, and 4.0
#
# 17 September 2020
# 05 February 2024
#
# Latest version: https://github.com/oasis-tcs/odata-abnf/blob/main/abnf/odata-abnf-testcases.yaml
#
Expand All @@ -19,18 +19,18 @@
#
# Additional artifacts:
# This test case document is one component of a Work Product which consists of:
# - OData Version 4.01 Part 1: Protocol
# - OData Version 4.01 Part 2: URL Conventions
# - OData ABNF Construction Rules Version 4.01
# - OData ABNF Test Cases Version 4.01 (this document)
# - OData Version 4.02 Part 1: Protocol
# - OData Version 4.02 Part 2: URL Conventions
# - OData ABNF Construction Rules Version 4.02
# - OData ABNF Test Cases Version 4.02 (this document)
#
# Related work:
# This specification replaces or supersedes:
# - OData ABNF Test Cases Version 4.0
# This work product is related to
# - OData Common Schema Definition Language (CSDL) JSON Representation Version 4.01
# - OData Common Schema Definition Language (CSDL) XML Representation Version 4.01
# - OData JSON Format Version 4.01
# - OData Common Schema Definition Language (CSDL) JSON Representation Version 4.02
# - OData Common Schema Definition Language (CSDL) XML Representation Version 4.02
# - OData JSON Format Version 4.02
#
# Abstract:
# The Open Data Protocol (OData) enables the creation of REST-based data
Expand All @@ -42,10 +42,10 @@
#
# Overview:
# This document contains positive and negative test cases for the
# OData ABNF Construction Rules Version 4.01.
# OData ABNF Construction Rules Version 4.02.
# Positive test cases consist of the rule to test, the input string to parse,
# and a description of the test case, often starting with a section number
# referring to OData Version 4.01 Part 2: URL Conventions.
# referring to OData Version 4.02 Part 2: URL Conventions.
# Negative test cases in addition state the character position at which the
# invalid portion of input text starts, 0 meaning the whole input string.
#
Expand Down Expand Up @@ -3577,26 +3577,34 @@ TestCases:
Rule: header
Input: isolation:sNapShoT

- Name: Header - odata-maxversion
- Name: Header - odata-maxversion 4.0
Rule: header
Input: "odata-maxversion: 4.0"

- Name: Header - odata-maxversion next
- Name: Header - odata-maxversion 4.01
Rule: header
Input: "odata-maxversion: 4.01"

- Name: Header - odata-maxversion
- Name: Header - odata-maxversion 4.02
Rule: header
Input: "odata-maxversion: 4.02"

- Name: Header - odata-maxversion weird
Rule: header
Input: odata-maxversion:06.2831852000

- Name: Header - odata-version
- Name: Header - odata-version 4.0
Rule: header
Input: "odata-version: 4.0"

- Name: Header - odata-version
- Name: Header - odata-version 4.01
Rule: header
Input: "odata-version: 4.01"

- Name: Header - odata-version 4.02
Rule: header
Input: "odata-version: 4.02"

- Name: Preferences - allow entity references and maximum page size
Rule: prefer
Input: "Prefer: odata.allow-entityreferences,odata.maxpagesize=20"
Expand Down

0 comments on commit 7952c35

Please sign in to comment.