Fix rename commit composition: drop unrelated test files, finish entitlements rename
Untrack ConversationListViewPureLogicTests.swift and NativeTextEditorPureLogicTests.swift — these belong to two other unrelated, unfinished features (conversation multi-select and input code formatting) and got swept in by an overly broad glob in the previous commit. Files remain on disk, just untracked again. Also stage the deletion of the old oAI.entitlements path — the earlier git mv to Confab.entitlements had its staged rename undone by an intermediate git reset, so the previous commit added the new file without ever removing the old one from tracking.
This commit is contained in:
@@ -1,54 +0,0 @@
|
||||
//
|
||||
// ConversationListViewPureLogicTests.swift
|
||||
// oAITests
|
||||
//
|
||||
// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
|
||||
// Copyright (C) 2026 Rune Olsen
|
||||
|
||||
import Testing
|
||||
import Foundation
|
||||
@testable import Confab
|
||||
|
||||
@Suite("ConversationListView.idsInRange")
|
||||
struct ConversationListViewPureLogicTests {
|
||||
|
||||
private let ids = (0..<6).map { _ in UUID() }
|
||||
|
||||
@Test("Forward range includes anchor and target inclusive")
|
||||
func forwardRange() {
|
||||
let result = ConversationListView.idsInRange(orderedIds: ids, anchorId: ids[1], targetId: ids[4])
|
||||
#expect(result == Set(ids[1...4]))
|
||||
}
|
||||
|
||||
@Test("Backward range (target above anchor) still selects the span between them")
|
||||
func backwardRange() {
|
||||
let result = ConversationListView.idsInRange(orderedIds: ids, anchorId: ids[4], targetId: ids[1])
|
||||
#expect(result == Set(ids[1...4]))
|
||||
}
|
||||
|
||||
@Test("Anchor equal to target selects just that one id")
|
||||
func sameAnchorAndTarget() {
|
||||
let result = ConversationListView.idsInRange(orderedIds: ids, anchorId: ids[2], targetId: ids[2])
|
||||
#expect(result == [ids[2]])
|
||||
}
|
||||
|
||||
@Test("Nil anchor (first Shift-click) falls back to just the target")
|
||||
func nilAnchorFallsBackToTarget() {
|
||||
let result = ConversationListView.idsInRange(orderedIds: ids, anchorId: nil, targetId: ids[3])
|
||||
#expect(result == [ids[3]])
|
||||
}
|
||||
|
||||
@Test("Anchor no longer present in the ordered list falls back to just the target")
|
||||
func missingAnchorFallsBackToTarget() {
|
||||
let staleAnchor = UUID()
|
||||
let result = ConversationListView.idsInRange(orderedIds: ids, anchorId: staleAnchor, targetId: ids[3])
|
||||
#expect(result == [ids[3]])
|
||||
}
|
||||
|
||||
@Test("Single-element list selects that element")
|
||||
func singleElementList() {
|
||||
let solo = [ids[0]]
|
||||
let result = ConversationListView.idsInRange(orderedIds: solo, anchorId: ids[0], targetId: ids[0])
|
||||
#expect(result == [ids[0]])
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user