Ph0enixKM / Amber

💎 Amber the programming language compiled to bash
https://amber-lang.com
GNU General Public License v3.0
3.51k stars 67 forks source link

stdlib tests from amber files. #238

Open Mte90 opened 4 days ago

Mte90 commented 4 days ago

I am experimenting https://github.com/Ph0enixKM/Amber/issues/222 and I think that I did the first prototype to test with just one function.

~So I am trying to create a test on the fly but of course doesn't work. Instead the function replace_once works but it will require to manipulate the .rs file so I was trying to loop all the files in the folder.~

b1ek commented 4 days ago

tbh i expected #222 to be about writing a small testing framework in amber, and running the tests with it. and just like executing all amber tests in a single rust function

Mte90 commented 4 days ago

tbh i expected #222 to be about writing a small testing framework in amber, and running the tests with it. and just like executing all amber tests in a single rust function

Yes this is my plan but I don't have any experience with Rust with PHP/Python/Ruby/JS it will be more fast for me but this was just the first step to see if works the idea, to see if the test structure needs changes etc.

I am trying to create a way to generate anonymous function on the fly that are tests that execution this first prototype function.

PS: thanks for the various hints for Rust.

Mte90 commented 4 days ago

So I am trying but seems that Rust is too much difficult for me.

I tried following https://speedyleion.github.io/rust/test/2022/05/24/custom-test-runner-in-rust.html to create a custom test runner but seems that I am doing something wrong looking at the various errors I am getting.

Mte90 commented 3 days ago

I was able to do the loading on the fly of the Amber file for testing and so on.

We should check https://github.com/Ph0enixKM/Amber/issues/222#issuecomment-2189248974 before moving on