Skip to content

Commit

Permalink
~Fixed symbolic links
Browse files Browse the repository at this point in the history
  • Loading branch information
AjaniBilby committed Jul 19, 2023
1 parent 65af536 commit 0e5470f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions bnf/bnf.bnf
Expand Up @@ -2,6 +2,8 @@ program ::= %w* def+ ;
w ::= comment | " " | "\t" | "\n" | "\r\n" ;
comment ::= "#" !"\n"* "\n" ;

# test

name ::= letter ( letter | digit | "_" )* ;
letter ::= "a"->"z" | "A"->"Z" ;
digit ::= "0"->"9" ;
Expand Down
8 changes: 6 additions & 2 deletions test/index.js
Expand Up @@ -107,14 +107,18 @@ function ManualTests () {


async function Main() {
// Symbolic link to actual bnf
const testBnfSyntax = "./test/bnf/bnf.bnf";
if (!fs.existsSync(testBnfSyntax)) {
fs.linkSync("./bnf/bnf.bnf", testBnfSyntax);
}

// Update sample since it's renamed
const testBnfSample = "./test/sample/bnf/self.txt";
if (!fs.existsSync(testBnfSample)) {
fs.linkSync("./bnf/bnf.bnf", testBnfSample);
if (fs.existsSync(testBnfSample)) {
fs.unlinkSync(testBnfSample);
}
fs.linkSync("./bnf/bnf.bnf", testBnfSample);

CompileBNFs();
await SampleTests();
Expand Down

0 comments on commit 0e5470f

Please sign in to comment.