Comentários: separadores com no máximo "---"
Trechos com quatro ou mais hífens dentro de comentários viram "---" (strings não mudam). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
374b445a8f
commit
80bd330766
40 files changed
+137
-137
No files matched your search
@@ -73,7 +73,7 @@ static const char* ty(const TbBpTab* t, int bi) { return bi >= 0 ? t->blocks[bi]
|
||||
int main(void) {
|
||||
char warn[256];
|
||||
|
||||
/* -- importar ---------------------------------------------------------- */
|
||||
/* -- importar --- */
|
||||
TbBpTab* t = fresh();
|
||||
int n = tb_scratchblocks_import(SCRIPT, t, &CX, warn, sizeof(warn));
|
||||
CHECK(n == 1 && !warn[0], "importa um script (uma pilha, sem avisos)");
|
||||
@@ -106,7 +106,7 @@ int main(void) {
|
||||
!strcmp(t->blocks[child(t, item, 0)].in_text[0], "frutas"),
|
||||
"item (1) of [frutas v] usa a lista com nome");
|
||||
|
||||
/* -- exportar ---------------------------------------------------------- */
|
||||
/* -- exportar --- */
|
||||
char* txt = tb_scratchblocks_export(t, &CX);
|
||||
CHECK(txt && !strcmp(txt, EXPECTED), "exporta igual ao texto do fórum");
|
||||
if (txt && strcmp(txt, EXPECTED)) printf("---- obtido:\n%s----\n", txt);
|
||||
@@ -118,7 +118,7 @@ int main(void) {
|
||||
CHECK(txt2 && txt && !strcmp(txt, txt2), "ida e volta (exportar(importar(texto))) é estável");
|
||||
free(txt); free(txt2); free(t2); free(t);
|
||||
|
||||
/* -- blocos só do TinyBlocks: rótulo em português + ::categoria ------- */
|
||||
/* -- blocos só do TinyBlocks: rótulo em português + ::categoria --- */
|
||||
t = fresh();
|
||||
n = tb_scratchblocks_import(
|
||||
"when flag clicked\n"
|
||||
@@ -141,14 +141,14 @@ int main(void) {
|
||||
CHECK(txt && strstr(txt, "forever\n set pen size to (4)\nend\n"), "sempre (tampa) com corpo");
|
||||
free(txt); free(t);
|
||||
|
||||
/* -- linha desconhecida: avisa e segue -------------------------------- */
|
||||
/* -- linha desconhecida: avisa e segue --- */
|
||||
t = fresh();
|
||||
n = tb_scratchblocks_import("when flag clicked\nvoe para a lua\nerase all\n", t, &CX, warn, sizeof(warn));
|
||||
CHECK(n == 1 && strstr(warn, "linha 2"), "linha desconhecida gera aviso com o número da linha");
|
||||
CHECK(!strcmp(ty(t, t->blocks[t->top[0]].next), "Stage.Clear"), "e o resto continua sendo importado");
|
||||
free(t);
|
||||
|
||||
/* -- texto com colchetes é escapado ----------------------------------- */
|
||||
/* -- texto com colchetes é escapado --- */
|
||||
t = fresh();
|
||||
tb_scratchblocks_import("say [a \\] b]\n", t, &CX, warn, sizeof(warn));
|
||||
CHECK(!strcmp(t->blocks[t->top[0]].in_text[0], "a ] b"), "\\] dentro de [ ] é texto");
|
||||
|
||||
Reference in new issue
Block a user