chore(i18n): finish translating code comments and scripts to English
CI / Format and clippy (push) Successful in 1m57s
CI / Dependency audit (push) Successful in 13s
CI / Check desktop app (Linux) (push) Successful in 3m54s
CI / Tests (Linux) (push) Failing after 7m25s
Release / Create release (push) Successful in 6s
Release / CLI (linux-aarch64) (push) Successful in 1m48s
Release / CLI (linux-x86_64) (push) Successful in 2m39s
Release / Desktop app (linux-aarch64) (push) Successful in 10m9s
Release / Desktop app (linux-x86_64) (push) Successful in 12m20s
Release / Desktop app (windows) (push) Successful in 7m32s
Release / Build latest.json (push) Successful in 5s
CI / Format and clippy (push) Successful in 1m57s
CI / Dependency audit (push) Successful in 13s
CI / Check desktop app (Linux) (push) Successful in 3m54s
CI / Tests (Linux) (push) Failing after 7m25s
Release / Create release (push) Successful in 6s
Release / CLI (linux-aarch64) (push) Successful in 1m48s
Release / CLI (linux-x86_64) (push) Successful in 2m39s
Release / Desktop app (linux-aarch64) (push) Successful in 10m9s
Release / Desktop app (linux-x86_64) (push) Successful in 12m20s
Release / Desktop app (windows) (push) Successful in 7m32s
Release / Build latest.json (push) Successful in 5s
Completes the English-only standardization for code, comments, scripts and CI templates (UI/CLI-facing strings stay bilingual pt-BR/en, untouched). Covers the remaining crates/, apps/gui/ui/ and apps/gui/src-tauri/ comments, .gitea/ workflow and template comments, .githooks/ hooks, and the scripts/ source comments for the files already renamed in a prior commit (check.sh, generate-logo.py, install-hooks.sh). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VAyr8d7HuAdUGB6aA5xmDD
This commit is contained in:
1 parent
da212e6926
commit
6328220c60
129 files changed
+1961
-1834
No files matched your search
@@ -1,5 +1,5 @@
|
||||
//! Leitor de SQLite: esquema, linhas (com overflow e árvores de vários níveis),
|
||||
//! registros apagados e robustez contra bancos danificados.
|
||||
//! SQLite B-tree reader tests: schema parsing, multi-level B-trees with overflow pages,
|
||||
//! deleted-row carving from freeblocks, and fuzz/truncation resilience.
|
||||
|
||||
use guara_core::source::MemSource;
|
||||
use guara_core::sqlite::{is_sqlite, Cell, Db};
|
||||
@@ -37,7 +37,7 @@ fn esquema_com_tabelas_indices_e_views() {
|
||||
assert_eq!(s.indexes, ["idx_usuarios_email"]);
|
||||
assert_eq!(s.views, ["maiores"]);
|
||||
assert!(s.warnings.is_empty(), "{:?}", s.warnings);
|
||||
assert_eq!(db.count_rows(u), 493); // 500 menos 7 apagados
|
||||
assert_eq!(db.count_rows(u), 493); // 500 inserted rows minus 7 deleted rows
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -47,17 +47,17 @@ fn linhas_em_arvore_de_varios_niveis_e_paginacao() {
|
||||
let p = db.rows("usuarios", 0, 5).unwrap();
|
||||
assert_eq!(p.total, 493);
|
||||
assert_eq!(p.rows.len(), 5);
|
||||
// o alias do rowid (INTEGER PRIMARY KEY) vem preenchido
|
||||
// `INTEGER PRIMARY KEY` column (`id`) is populated from the B-tree cell `rowid`
|
||||
assert!(matches!(p.rows[0].cells[0], Cell::Int(1)));
|
||||
assert_eq!(text(&p.rows[0].cells[1]), "Pessoa 0001");
|
||||
assert_eq!(text(&p.rows[0].cells[2]), "pessoa1@exemplo.com");
|
||||
assert!(matches!(p.rows[0].cells[3], Cell::Int(19)));
|
||||
assert!(matches!(p.rows[1].cells[4], Cell::Real(r) if (r - 3.0).abs() < 1e-9));
|
||||
assert!(matches!(&p.rows[2].cells[5], Cell::Blob { len: 3, .. }));
|
||||
// pula os apagados 101..103: a linha de índice 100 é o id 104
|
||||
// rows 101..=103 were deleted, so row index 100 is `id = 104`
|
||||
let q = db.rows("usuarios", 100, 2).unwrap();
|
||||
assert!(matches!(q.rows[0].cells[0], Cell::Int(104)));
|
||||
// última linha
|
||||
// last row (`id = 500`)
|
||||
let last = db.rows("usuarios", 492, 10).unwrap();
|
||||
assert_eq!(last.rows.len(), 1);
|
||||
assert_eq!(text(&last.rows[0].cells[1]), "Pessoa 0500");
|
||||
@@ -114,13 +114,13 @@ fn recupera_registros_apagados_das_areas_livres() {
|
||||
"só {achados} de 7 registros apagados recuperados: {nomes:?}"
|
||||
);
|
||||
assert!(d.rows.iter().all(|r| r.deleted));
|
||||
// a tabela de notas não teve nada apagado
|
||||
// the second table had no deleted rows
|
||||
assert!(db.deleted_rows("notas").unwrap().rows.is_empty());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn banco_truncado_e_corrompido_nao_derruba_nem_trava() {
|
||||
// metade do arquivo
|
||||
// truncated to half the file size
|
||||
let half = DB[..DB.len() / 2].to_vec();
|
||||
let src = MemSource(half);
|
||||
let db = Db::open(&src).unwrap();
|
||||
@@ -132,11 +132,11 @@ fn banco_truncado_e_corrompido_nao_derruba_nem_trava() {
|
||||
);
|
||||
let p = db.rows("usuarios", 0, 1000).unwrap();
|
||||
assert!(!p.rows.is_empty() && p.rows.len() < 493, "{}", p.rows.len());
|
||||
// sem cabeçalho
|
||||
// wiped SQLite header
|
||||
let mut bad = DB.to_vec();
|
||||
bad[0] = b'X';
|
||||
assert!(Db::open(&MemSource(bad)).is_err());
|
||||
// corrupção aleatória (semente fixa): nunca pode dar panic
|
||||
// deterministic pseudo-random byte corruption: must never panic
|
||||
let mut x: u64 = 0x1234_5678_9abc_def0;
|
||||
for _ in 0..60 {
|
||||
let mut d = DB.to_vec();
|
||||
|
||||
Reference in new issue
Block a user