{"id":16328135,"url":"https://github.com/terminaldweller/luactest","last_synced_at":"2026-04-30T03:34:20.189Z","repository":{"id":109635451,"uuid":"187478502","full_name":"terminaldweller/luactest","owner":"terminaldweller","description":"Run tests for your C functions from Lua semi-automatically.","archived":false,"fork":false,"pushed_at":"2020-03-05T02:48:43.000Z","size":427,"stargazers_count":0,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-29T15:58:17.406Z","etag":null,"topics":["automation","c","lua","test"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/terminaldweller.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-19T13:12:44.000Z","updated_at":"2020-03-05T02:48:45.000Z","dependencies_parsed_at":"2023-04-01T13:19:46.052Z","dependency_job_id":null,"html_url":"https://github.com/terminaldweller/luactest","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/terminaldweller/luactest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terminaldweller%2Fluactest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terminaldweller%2Fluactest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terminaldweller%2Fluactest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terminaldweller%2Fluactest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/terminaldweller","download_url":"https://codeload.github.com/terminaldweller/luactest/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terminaldweller%2Fluactest/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32453899,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"online","status_checked_at":"2026-04-30T02:00:05.929Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","c","lua","test"],"created_at":"2024-10-10T23:13:48.666Z","updated_at":"2026-04-30T03:34:15.181Z","avatar_url":"https://github.com/terminaldweller.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/bloodstalker/luactest.svg?branch=master)](https://travis-ci.org/bloodstalker/luactest)\n[![Total alerts](https://img.shields.io/lgtm/alerts/g/bloodstalker/luactest.svg?logo=lgtm\u0026logoWidth=18)](https://lgtm.com/projects/g/bloodstalker/luactest/alerts/)\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fbloodstalker%2Fluactest.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fbloodstalker%2Fluactest?ref=badge_shield)\n\u003ca href=\"https://scan.coverity.com/projects/bloodstalker-luactest\"\u003e\n  \u003cimg alt=\"Coverity Scan Build Status\"\n       src=\"https://img.shields.io/coverity/scan/18518.svg\"/\u003e\n\u003c/a\u003e\n\n\n# luactest\nThe idea is to be able to write and run tests for C functions in Lua. inspired by me being lazy and my life being too short for writing tests for C in C.\u003cbr/\u003e\nThe workflow is the clang libtooling tool under `libtool` will find the funcitons and add their lua wrapper into source code and register it with lua. `luatablegen` is a python script that takes an XML script describing your C structs and turns them into lua tables since almost every non-toy C code uses structs anyways and adding C structs as Lua tables is non-trivial. after that you just build the tool(its not a typo, you actually build your tool) which is a Lua 5.3 interpreter. you then write your test scripts in Lua and run them. `linenoise` is there to give you some basic cli functionality if you choose to run the tool in interactive mode. the `default.lua` file works as the dot file. The default provided will add your `luarocks` libraries to our custom Lua instance for some added quality of life.\u003cbr/\u003e\n\n## Demo\nyou can run the makefile in the root directory. then run the executable, type in `dofile(\"./test.lua\")`and see the result. it runs our little test function from Lua which converts a string into an integer. \u003cbr\\\u003e\n\n## TODO\n* write the libtooling tool.\u003cbr/\u003e\n* need to add completion and hints for `linenoise`.\u003cbr/\u003e\n* add non-interactive execution to tool.\u003cbr/\u003e\n* add cygwin support because i have to use windows at work...\u003cbr/\u003e\n\n\n## Notes\nThe `luarocks` feature work for Lua 5.3. I haven't looked at the Lua 5.4 changelog yet.\u003cbr/\u003e\n\n## Build\nIf you don't have clang, subtitute all `make` commands with `make CC=gcc`.\u003cbr/\u003e\nThen run:\u003cbr/\u003e\n```sh\ngit clone https://github.com/bloodstalker/luactest\ngit submodule init\ngit submodule update\nmake\n```\n\nTo build the libtooling tool run make under `libtool` directory.\u003cbr/\u003e\nThe tool right now should support LLVM 5,6,8 and 9(latest tested trunk:355787).\u003cbr/\u003e\n\n\n## License\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fbloodstalker%2Fluactest.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fbloodstalker%2Fluactest?ref=badge_large)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterminaldweller%2Fluactest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fterminaldweller%2Fluactest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterminaldweller%2Fluactest/lists"}