defmodule VavPipeline.Tablet40InvertedNunsTest do @moduledoc """ Tablet 40 (2026-10-04) — the inverted nuns. *Vayehi binsoa ha'aron* (Bamidbar 10:35–36) is marked off in the scroll by a nun hafukha before it and after it. The WLC carries both signs; the builder read past them. They are now engraved on the verse each one follows — 10:34 and 10:36 — and the reader carries them. """ use ExUnit.Case, async: true alias VavPipeline.L1Reader test "an inverted nun follows Bamidbar 10:34 and another follows 10:36" do for verse <- [34, 36] do {:ok, v} = L1Reader.read_verse("bamidbar", 10, verse) assert v.inverted_nuns == [%{after_word: length(v.words)}], "Bamidbar 10:#{verse}" end end test "the two verses between them carry none — the signs bracket the passage" do {:ok, v35} = L1Reader.read_verse("bamidbar", 10, 35) assert v35.inverted_nuns == [] assert hd(v35.words).consonants == "ויהי" assert Enum.at(v35.words, 1).consonants == "בנסע" end test "each nun stands with a setumah, and neither is in the verse's text" do for verse <- [34, 36] do {:ok, v} = L1Reader.read_verse("bamidbar", 10, verse) assert v.parashah_breaks == [%{after_word: length(v.words), type: :setumah}] refute v.text_hebrew =~ "׆" end end test "there are exactly two in the whole scroll" do index = L1Reader.l1_root() |> Path.join("torah/index.json") |> File.read!() |> Jason.decode!() refs = for book <- index["books"], {chapter, verses} <- book["chapter_verse_counts"], verse <- 1..verses, {:ok, v} = L1Reader.read_verse(book["book"], String.to_integer(chapter), verse), v.inverted_nuns != [], do: v.ref assert Enum.sort(refs) == ["Bamidbar 10:34", "Bamidbar 10:36"] end test "every other verse carries an empty list, not a missing field" do {:ok, v} = L1Reader.read_verse("bereishit", 1, 1) assert v.inverted_nuns == [] end end