Comments (8)
@carlpett the way users should write tests, is by following the pattern found in the examples folder. The stuff found in tests is for testing the TesTcl itself (consider them unit-tests).
TesTcl heavily relies on the "unknown" command, which kicks in whenever an unknown/undefined proc is called, in this case the class command. I'll quickly check @jamespic's code to see if I can sort out what's going on. Stay tuned.
from testcl.
@jamespic: From the commit log, it looks like you contributed this functionality - thanks for the effort! Do you have any insight in what could cause this? I tried running the test/test_class.tcl
file included in the release, and that does seem to work. However, it seems to be bypassing a lot of the "normal" import structure and instead including parts explicitly with source src/classes.tcl
and so on. I'm guessing that is not what I as an end user should do?
from testcl.
@carlpett It's been a while since I worked with the codebase, and my Tcl isn't that strong (I basically learned just enough to solve our problem, on the project where I used this), but my recollection is that we used explicit source src/classes.tcl
in our code.
I could readily believe that that's not the Tcl way, so feel free to refactor it to be more idiomatic.
from testcl.
@jamespic Thanks for the quick reply! I'm basically in the same boat, no tcl knowledge outside the quite simple stuff in irules. I'll try and see if I can get my rules and tests working by adding source
then.
@landro: If this is how it is meant to be done, I could try to update the examples?
from testcl.
from testcl.
@carlpett Could you please test the classes_fix branch and see if it works for you? I added an example that show how end users should use this functionality, see examples directory
from testcl.
@landro It works! Thanks a lot, great work!
from testcl.
fixed in 99ab81f
from testcl.
Related Issues (20)
- Implement IP::addr
- Error using HTTP::cookie HOT 4
- Variable support HOT 5
- Documentation should explain what you'll see if misconfigured HOT 7
- Error if test file is not found HOT 1
- Overwriting Fields in iRule HOT 5
- Docker Image HOT 3
- Update download link for jtcl-irule.jar HOT 1
- linting of the test files? HOT 1
- iRule problem HOT 1
- irules withour rule name { } HOT 4
- Return ok with failed tests HOT 2
- testing elseif/else conditions failure HOT 1
- Support for -normalized flags
- Implementing K23237429
- Support for virtual HOT 2
- Return code != 0 when tests are failing
- getfield implementation splits only on character and not string
- Variables used for calling one iRule are reused for following IT
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from testcl.