-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_example.sh
More file actions
executable file
·58 lines (47 loc) · 1.06 KB
/
test_example.sh
File metadata and controls
executable file
·58 lines (47 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
echo "📝 Criando ambiente de teste para RSFE"
echo ""
# Criar diretório de teste
TEST_DIR="test_project"
rm -rf "$TEST_DIR"
mkdir -p "$TEST_DIR"
cd "$TEST_DIR"
# Copiar o binário compilado
cp ../target/release/rsfe .
# Criar arquivo de configuração
cat > rsfe.conf << 'EOF'
# Configuração de teste
** UTF-8
**/*.js UTF-8
**/*.py UTF-8
**/*.txt UTF-8
EOF
# Criar alguns arquivos de teste
mkdir -p src
# Arquivo JS normal
cat > src/test.js << 'EOF'
console.log("Hello World");
const name = "João";
EOF
# Arquivo Python com caracteres especiais
cat > src/test.py << 'EOF'
# -*- coding: utf-8 -*-
def hello():
print("Olá Mundo!")
# Teste: café, ação, São Paulo
EOF
# Arquivo de texto simples
cat > notes.txt << 'EOF'
Notas do projeto:
- Implementar funcionalidade X
- Testar casos de uso
- Revisar documentação
EOF
echo "✅ Ambiente de teste criado em: $TEST_DIR"
echo ""
echo "Arquivos criados:"
find . -type f -name "*.js" -o -name "*.py" -o -name "*.txt" | grep -v rsfe
echo ""
echo "Para testar:"
echo " cd $TEST_DIR"
echo " ./rsfe"