Skip to content

Commit

Permalink
Test deprecated double-dot variable syntax (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamchainz authored Oct 23, 2024
1 parent 3845bc4 commit d90058d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2027,6 +2027,14 @@ mod tests {
assert_eq!(formatted, "{{ engines[0].name | length }}\n");
}

#[test]
fn test_format_variables_double_dot() {
// Double dot syntax for "empty string lookup" deprecated:
// https://code.djangoproject.com/ticket/35738
let formatted = format("{{ engine..name }}\n", None);
assert_eq!(formatted, "{{ engine..name }}\n");
}

#[test]
fn test_format_block_bits() {
let formatted = format("{% if breakfast == 'egg' %}\n", None);
Expand Down

0 comments on commit d90058d

Please sign in to comment.