That looks like standard UK wiring using older colours.
You should really go out and buy a voltage tester but you can make up a test lamp with a pendant lamp-holder and a low-wattage bulb.
The lamp holder can be obtained from many stores. Alternatively you probably have one somewher in your home or in a garage that you can temporarily borrow.
The lamp holder has a bayonet socket (or Edison-screw socket) at one end for the light-bulb and at the other end, under a screw-off cover, has two screw-terminals for wire connections.
Your wiring works like this, note that one of the black wires is a switched live. Connecting that to the other blacks will blow your fuse or trip your breaker when you turn the light on, so don't connect the blacks together yet.
Step one is to identify which cable comes from the consumer unit. We are only concerned with the black (neutral) wires.
- find a light on the same circuit that turns on correctly (this is your safety test)
- Turn off power to the relevant lighting circuit
- Check that power is off (try turning on/off the light that worked and is definitely on the same circuit).
- Number, mark or label the black wires so you can tell them apart
- Attach one terminal of the bulb-holder to all of the red wires. If necessary you can use terminal blocks and short lengths of red wire.
- Attach the other terminal of the test bulb to one of the black wires and leave the other black wires separate
- turn on the power and see if the light is on, if so, that black wires goes to the main panel, mark it.
- if necessary turn off power and repeat with other black wires until you worked out which one goes to the main panel.
Step two is to work out which of the other black wires is a switched live.
- make sure all the light switches on the same circuit are turned off. This usually means all light switches on the same floor.
- turn off power to the circuit
- disconnect the bulb holder
- connect one terminal of the bulb holder to the black wire that comes from the main panel (consumer unit).
- connect the other terminal to one of the other two black wires
- leave the other black wire separate
- turn on power
- if the light switch turns your test bulb on and off you have identified the black wire that is switched live from the switch loop, if so, mark it with red electricians tape.
- if necessary try the other black wire but remember to turn off power before touching anything.
Finally connect the spare black wire to the black wire that comes from the main panel (consumer unit)
Before starting, I recommend you read the answers to